The shell's vertical position [tex]y[/tex] at time [tex]t[/tex] is given by
[tex]y=25.0\,\mathrm m-\dfrac g2t^2[/tex]
where [tex]g=9.81\,\dfrac{\mathrm m}{\mathrm s^2}[/tex] is the acceleration due to gravity. The shell hits the water when [tex]y=0[/tex], so the time it takes for that to happen is
[tex]0=25.0\,\mathrm m-\dfrac g2t^2\implies t=2.26\,\mathrm s[/tex]
For the shell to reach a height of [tex]y=5.00\,\mathrm m[/tex], it must travel for a time [tex]t[/tex] such that
[tex]5.00\,\mathrm m=25.0\,\mathrm m-\dfrac g2t^2\implies t=2.02\,\mathrm s[/tex]
The shell's horizontal position [tex]x[/tex] is given by
[tex]x=\left(75.0\,\dfrac{\mathrm m}{\mathrm s}\right)t[/tex]
so that after 2.02 seconds, the warship should be at a distance
[tex]x=\left(75.0\,\dfrac{\mathrm m}{\mathrm s}\right)(2.02\,\mathrm s)=153\,\mathrm m[/tex]
away from the pirate ship in order to hit it at the desired height.