3d vector perpendicular confusion This is a very specific issue I'm dealing with, so I'll post the question below:

The Diagram [not included] illustrates the flight path of a helicopter H taking off from an airport.
  Coordinate axes Oxyz are sup up with origin O at the base of the airport control tower. The x axis is due east, the y axis due north, and the z axis vertical.. The units of distance are kilometers throughout.
The helicopter takes off from point G. The position vector r of the helicopter t minutes after take-off is given by 
  r = (1 + t)i + (0.5 + 2 t)j + 2 t k
(i) Write down the co-ordinates of G [the answer is (1, 0.5, 0)]
(ii) Find the angle the flight path makes with the horizontal [answer: 48.1 degrees]
(iii) Find the Bearing of the flight path [answer: 027 degrees]
(iv) The helicopter enters a cloud at a height of 2km. Find the co-ordinates of the point where the helicopter enters the cloud [answer: (2, 2.5, 2)
(v) A mountain top is situated at M (5, 4.5, 3)
  Find the value of t when HM is perpendicular to the flight path GH.
  Find the distance from the helicopter to the mountain top at this time.

It's part (v) that has me completely confused. How on earth do I find the point where they are perpendicular without a vector for GH? My best guess so far is find the angle MGH and then use tan to find the ratio between the coefficient of lambda for the equation of the line through G and H and the same coefficient for the line through M and H. That seems super involved though, and I'm sure there's meant to be a simpler way of doing this.
Help!

Look at $r$, which I'll call $r(t)$. There's some value of $t$ for which $r(t)$, which they call $H$, has the property asked for. The thing you want, for part v, is
$$
(H - M) \cdot (H - G) = 0
$$
where that's the dot-product of vectors, which is zero when the vectors are perpendicular. Substituting $r(t)$ for $H$, we get
$$
(r(t) - M)\cdot (r(t) - G) = 0
$$
And rewriting 
$$
\newcommand{\d}{{\mathbf d}}
r(t) = G + t \d
$$
where
$$
\d = (1, 2, 2)
$$
we get
\begin{align}
0 &= (r(t) - M)\cdot (r(t) - G)\\
0 &= (G + t \d - M)\cdot (G + t \d - G)\\
0 &= (t \d + (G - M) )\cdot (t \d)\\
0 &= (t \d \cdot t\d + (G - M) \cdot t \d\\
0 &= t^2 \d \cdot \d + t (G - M) \cdot \d\\
0 &= t( t \d \cdot \d +  (G - M) \cdot \d)
\end{align}
whence either $t = 0$ (not the right answer!) or 
\begin{align}
0 &=  t \d \cdot \d +  (G - M) \cdot \d \\
-t \d \cdot \d  &= (G-M) \cdot \d  \\
t  &= - \frac{(G-M) \cdot \d}{\d \cdot \d }.
\end{align}
You can now plug in the actual values of $G, M,$ and $\d$ to get the value of $t$, and from that, you can compute $H$. 
