Hi Vicky,
What you will need to do is remover the 2 vertical pieces and buy new ones that are long enough that you can cut them to the longer size.
The only reason you would need to replace the top piece of trim is if you cannot find the vertical replacement trim that matches the old.
I hope this helps,
Jim