4. Given a triangle with vertices at the coordinates A(2, 4), B(1, -2), C(3, 7):
(a) Find the lengths of the sides.
(b) Use the Law of Cosines formula to find $\cos(\angle BAC)$. NOTE the formula can
be rewritten as
$\cos(\angle BAC) = \frac{b^2 + c^2 - a^2}{2bc}$
where $a$, $b$, $c$ are BC, AC, AB respectively.
(c) Confirm your answer by finding $\cos(\angle BAC)$ by using the dot product for-
mula to find the angle between $a = \overrightarrow{AB} = (-1, -6)$ and $b = \overrightarrow{AC} = (1, 3)$.
NOTE that you found the magnitudes in part (a), and you can compute the
dot product by just using arithmetic operations.