Answer
$H=31.1\space m$, $D=850\space m$
Work Step by Step
Let's apply equation 3.5a $S=ut$ in the horizontal direction to find the time that the bullet spends in the building.
$\rightarrow S=ut$ ; Let's plug known values into this equation.
$6.9\space m=340\space m/s\times t=>t=0.0203\space s$
Let's apply equation 3.5a $S=ut+\frac{1}{2}at^{2}$ in the vertical direction to find the vertical velocity component of the bullet as it passes through the window.
$\uparrow S=ut+\frac{1}{2}at^{2}$ ; Let's plug known values into this equation.
$u_{window}=\frac{S}{t}-\frac{1}{2}(-g)(0.0203\space s)^{2}=-\frac{0.5\space m}{0.0203\space s}+4.9\times0.0203\space m/s=-24.5\space m/s$
Let's apply equation 3.6b $V^{2}=u^{}+2aS$ in the vertical direction to find the vertical displacement of the bullet as it travels between the buildings.
$\uparrow V^{2}=u^{}+2aS$ ; Let's plug known values into this equation.
$(-24.5\space m/s)^{2}=0+2(-9.8\space m/s^{2}S)=>S=-30.6\space m$
So, we can get.
$H=30.6\space m+0.5\space m=31.1\space m$
Let's apply equation 3.4b $S=(\frac{u+V}{2})t$ in the vertical direction to find the time for the bullet to reach the window.
$\uparrow S=(\frac{u+V}{2})t$ ; Let's plug known values into this equation.
$t_{1}=\frac{2S}{u_{window}}=\frac{2(-30.6\space m)}{-24.5\space m/s}=2.5\space s$
So, we can get,
$D=340\space m/s\times2.5\space s=850\space m$