Given initial positions and velocities of two boats, do they collide? This is a homework question from a precalculus class that I'm a TA for.

Boat $A$ is initially at position $(1,4)$ and moves at a constant velocity $\langle 3,5 \rangle$. Boat $B$ is at position $(7,2)$ and moves at a constant velocity of $\langle 1,10 \rangle$. Do the paths of the boats ever cross? If so where? Will the boats collide? If they don't collide, what's the closest the boats get to each other?

I wanted to write up a thorough solution to this exercise for my class, and figured I'd post it online to help anyone else who may wander across it.
 A: Let $P_A(a)$ denote the position of the boat $A$ at time $a$, and let $P_B(b)$ denote the position of boat $B$ at time $b$. From the initial positions and velocities given, we have:
$$
\begin{align}
  P_A(a) &= (1,4) + a\langle 3,5 \rangle
  &\qquad
  P_B(b) &= (7,2) + b\langle 1,10 \rangle
  \\
  &= (3a+1, 5a+4) 
  &\qquad
  &= (b+7,10b+2)
\end{align}
$$
Now these equations give the paths of the boats starting at time $a=b=0$. The paths of the boats cross only if at some time $a$ and some time $b$ after each starts moving they have the same position. In terms of those equations, the paths of the boats will cross if there are positive times $a$ and $b$ such that $P_A(a) = P_B(b)$. Now the boats collide if not only is there a location where their paths cross, but if they are at that location at the same time. So the boats collide if $P_A(a) = P_B(b)$ for some positive $a$ equal to $b$. So we can proceed by setting $P_A = P_B$:
$$
  (3a+1, 5a+4) 
  = (b+7,10b+2)
\implies
\begin{cases}
3a+1=5a+4
\\
b+7=10b+2
\end{cases}\
\implies
\begin{cases}
3a-b=6
\\
5a-10b=-2
\end{cases}\,,
$$
This, being a system of linear equations, has at most a single solution, which we can calculate to be $a = \frac{62}{25}$ and $b = \frac{36}{25}$. These are both positive times, so the paths of the boats do cross, but since this is the only solution and $a \neq b$, the boats do not collide. To find the actual coordinates  where they do cross will be the location of boat $A$ at time $a=\frac{62}{25}$ (which should equal the location of $B$ at time $b=\frac{36}{25}$ if we've done our calculations correctly), which we can calculate:
$$
P_A\left(\frac{62}{25}\right) 
= \left(3\cdot\frac{62}{25}+1, 5\cdot\frac{62}{25}+4\right)
= \left(\frac{211}{25} , \frac{410}{25} \right)\,.
$$
To figure out how close the boats get, we can write a function to represent the distance between the boats at a time $t$ and minimize that function. We now need to consider the boats in the same time-frame and let $a=b=t$. The distance between boat $A$ and boat $B$ is given by
$$\begin{align}
d(t) &= \sqrt{(3t+1-t-7)^2+(5t+4-10t-2)^2}
\\   &= \sqrt{29t^2-4t+40}
\end{align}$$
The minimum of the function $d$ will occur at the minimum of the quadratic $29t^2-4t+40$ since the square root is a strictly increasing function. And the minimum of that quadratic occurs at $t = \frac{4}{2\cdot 29} = \frac{2}{29}$. So the actual minimum distance they achieve is $d(
\frac{2}{29}) = \frac{34}{\sqrt{29}}$ miles apart.
