To remember sign conventions easily: expansion always means the system loses energy by doing work on the surroundings, so $W$ is negative. Thus, $\text{Work Magnitude} = P \times \Delta V \implies 5 = 2.5 \times \Delta V \implies \Delta V = 2\ \mathrm{L}$. Since it expanded to $4.5\ \mathrm{L}$, it must have started at $4.5 - 2 = 2.5\ \mathrm{L}$.