Answer :
For these projectiles,
[tex]{v_f}^2-{v_i}^2=-2g(y_{\rm max}-y_i)[/tex]
where [tex]v_f[/tex] is the projectile's final velocity (which is 0 at maximum height), [tex]v_i[/tex] is its initial velocity, [tex]g=9.80\frac{\rm m}{\mathrm s^2}[/tex] is the acceleration due to gravity, and [tex]y_i[/tex] is its initial height.
Let [tex]y_A,y_B[/tex] denote the maximum heights of pumpkins A and B, respectively. Then
[tex]-\left(45\dfrac{\rm ft}{\rm s}\right)^2=-2g(y_A-10\,\mathrm{ft})\implies y_A=113\,\mathrm{ft}[/tex]
[tex]-\left(40\dfrac{\rm ft}{\rm s}\right)^2=-2g(y_B-25\,\mathrm{ft})\implies y_B=107\,\mathrm{ft}[/tex]
So pumpkin A reaches a greater maximum height.