Answer
The initial speed required is
${v_0} = \frac{{\sqrt {g/2} d\sec \theta }}{{\sqrt {d\tan \theta - h} }}$
Work Step by Step
Let ${v_0}$ denote the initial speed of the bullet. So, we have the initial velocity:
${\bf{v}}\left( 0 \right) = \left( {{v_0}\cos \theta ,{v_0}\sin \theta } \right)$,
where $\theta$ here denotes the initial angle.
Let the initial position be ${\bf{r}}\left( 0 \right) = \left( {0,0} \right)$.
The only force that acts on the bullet is the gravitational force. So, the acceleration due to gravity is ${\bf{a}}\left( t \right) = - g{\bf{j}}$ $m/{s^2}$.
1. Find the velocity vector
We have
${\bf{v}}\left( t \right) = \smallint {\bf{a}}\left( t \right){\rm{d}}t = \smallint \left( {0, - g} \right){\rm{d}}t = \left( {0, - gt} \right) + {{\bf{c}}_0}$
The initial condition ${\bf{v}}\left( 0 \right) = \left( {{v_0}\cos \theta ,{v_0}\sin \theta } \right)$ gives
$\left( {{v_0}\cos \theta ,{v_0}\sin \theta } \right) = \left( {0,0} \right) + {{\bf{c}}_0}$
${{\bf{c}}_0} = \left( {{v_0}\cos \theta ,{v_0}\sin \theta } \right)$
Thus,
${\bf{v}}\left( t \right) = \left( {0, - gt} \right) + \left( {{v_0}\cos \theta ,{v_0}\sin \theta } \right)$
${\bf{v}}\left( t \right) = \left( {{v_0}\cos \theta , - gt + {v_0}\sin \theta } \right)$
2. Find the position vector
We have
${\bf{r}}\left( t \right) = \smallint {\bf{v}}\left( t \right){\rm{d}}t = \smallint \left( {{v_0}\cos \theta , - gt + {v_0}\sin \theta } \right){\rm{d}}t$
${\bf{r}}\left( t \right) = \left( {{v_0}t\cos \theta , - \frac{1}{2}g{t^2} + {v_0}t\sin \theta } \right) + {{\bf{c}}_1}$
The initial condition ${\bf{r}}\left( 0 \right) = \left( {0,0} \right)$ gives
$\left( {0,0} \right) = \left( {0,0} \right) + {{\bf{c}}_1}$
${{\bf{c}}_1} = \left( {0,0} \right)$
Thus,
${\bf{r}}\left( t \right) = \left( {{v_0}t\cos \theta , - \frac{1}{2}g{t^2} + {v_0}t\sin \theta } \right)$
3. Solve for ${v_0}$
The top of the $h$-meter tower located at $d$ meters away can be represented by the point $\left( {d,h} \right)$. Thus, the bullet hits this point if there exists a time $t$ such that
${\bf{r}}\left( t \right) = \left( {{v_0}t\cos \theta , - \frac{1}{2}g{t^2} + {v_0}t\sin \theta } \right) = \left( {d,h} \right)$
In components we get
${v_0}t\cos \theta = d$, ${\ \ \ }$ $ - \frac{1}{2}g{t^2} + {v_0}t\sin \theta = h$
The first equation yields $t = \frac{d}{{{v_0}\cos \theta }}$. Substituting it in the second equation gives
$ - \frac{1}{2}g{\left( {\frac{d}{{{v_0}\cos \theta }}} \right)^2} + {v_0}\sin \theta \left( {\frac{d}{{{v_0}\cos \theta }}} \right) = h$
$ - \frac{1}{2}g\left( {\frac{{{d^2}}}{{{v_0}^2{{\cos }^2}\theta }}} \right) + d\tan \theta = h$
$\frac{{g{d^2}}}{{2{v_0}^2{{\cos }^2}\theta }} = d\tan \theta - h$
${v_0}^2 = \frac{{g{d^2}}}{{2\left( {d\tan \theta - h} \right){{\cos }^2}\theta }} = \frac{{\left( {g/2} \right){d^2}{{\sec }^2}\theta }}{{d\tan \theta - h}}$
Solving for ${v_0}$ we obtain the initial speed
${v_0} = \frac{{\sqrt {g/2} d\sec \theta }}{{\sqrt {d\tan \theta - h} }}$