I'm amazed I'm stuck on this question.

I need to find the value of t at which it becomes the minimum value.

$\displaystyle |\vec b|^2-2t\vec ab+t^2|\vec a|^2$

I thought you complete the square to find the minimum value. I can't get what they're getting by completing the square (although I get it when I use calculus)

$\displaystyle |\vec a|^2(t-\frac {\vec a*\vec b} {|\vec a|^2})^2+|\vec b|^2-\frac {(\vec a * \vec b)}{|\vec a|^2})$

How do you get that?