Consider the line $\ell$ in $\mathbb{R}^3$ parametrized by
$$v(t) = \begin{pmatrix} 2 \\ -3 \\ -3 \end{pmatrix} + \begin{pmatrix} 7 \\ 5 \\ -1 \end{pmatrix} t,
$$
and consider the point
$$
{a} = \begin{pmatrix} 4 \\ 4 \\ 5 \end{pmatrix}.
$$
Find the value of $t$ for which the point $v(t)$ on the line is closest to the point $a$.
$\textbf{Method 1}$. Let $p,q$ be two points in $\mathbb{R}^3$ and let $d(p,q) = || p-q||$ be the distance function between $p$ and $q$, where $||\cdot ||$ is the Euclidean norm.
Define $f(p,q)=d(p,q)^2$. Then thinking of $v(t)$, for a fixed $t$, as some point on the line $\ell$,
$$
f(v(t),a)= \left(\sqrt{(2+7t-4)^2+(-3+5t-4)^2+(-3-t-5)^2}\right)^2
= 75t^2 - 82t + 117.
$$
Since $t$ is arbitrary, now think of $t$ as a free parameter. So $f(v(t),a)$ is a function of $t$. Defining $g(t):= f(v(t),a)$, take the derivative of $g(t)=75t^2 - 82t + 117$ and set it equal to zero to obtain local min and local max (since $g$ is concave up, the point you get will be a global min):
$$
g'(t) = 150 t-82=0 \mbox{ implies } t = \frac{41}{75} \approx \boxed{0.546667}.
$$
We also see that the point on the line $\ell$ that is closest to the point $a$ is $$
v(0.546667) =
\left(
\frac{437}{75}, -\frac{4}{15}, -\frac{266}{75}
\right) \approx
\left(
5.82667, -0.266665, -3.54667
\right).
$$
$\textbf{Method 2}$. Let $b=(2,-3,-3)$, a point on the line $\ell$, and let $w$ be the vector
$$
w = a-b = (4,4,5)-(2,-3,-3) = \langle 2,7,8\rangle.
$$
Then letting $u=\langle 7,5,-1\rangle$, a directional vector of the line $\ell$, the projection of the vector $w$ onto $u$ is:
$$
\begin{align*}
\text{proj}_{u}w
&= \frac{u\cdot w}{u\cdot u}u \\
&= \frac{7(2)+5(7)+(-1)(8)}{7(7)+5(5)+(-1)(-1)} \langle 7,5,-1\rangle \\
&= \frac{14+35-8}{49+25+1} \langle 7,5,-1\rangle \\
&= \frac{41}{75}\langle 7,5,-1\rangle.
\end{align*}
$$
So the point on the line $\ell$ that is closest to the point $a$ is:
$$
\begin{align*}
v\left(\frac{41}{75}\right)
&= ( 2,-3,-3) +\frac{41}{75} ( 7,5,-1 ) \\
&= \left(
\frac{437}{75}, -\frac{4}{15}, -\frac{266}{75}
\right) \\
&\approx
\left(
5.82667, -0.266665, -3.54667
\right),
\end{align*}
$$
and $t$ must equal
$$
t=\frac{41}{75} \approx \boxed{0.546667}.
$$
$\textbf{Remark}$. It is worth noting that the distance between points $a$ and $v(0.546667)$ is
$$
\begin{align*}
||\text{ortho}_{u}w ||
&= || w-\text{proj}_u w || \\
&= \Bigg|\Bigg| \langle 2,7,8\rangle -\frac{41}{75} \langle 7,5,-1 \rangle \Bigg|\Bigg| \\
&= \Bigg|\Bigg| \left(
-\frac{137}{75} ,
\frac{64}{15},
\frac{641}{75}
\right) \Bigg|\Bigg| \\
&= \sqrt{\frac{7094}{75}} \\
&\approx 9.72557.
\end{align*}
$$