In Simmmon's Calculus with Analytic Geometry 3rd edition, on page 299, the following proof for the law of cosines is provided:
$$c^2 = a^2 + b^2 - 2ab \cos \theta$$ The proof is routine if we place the triangle in the $xy$-plane as shown in the figure and apply the distance formula to the vertices $(a \cos \theta, a \sin \theta)$ and $(b, 0)$
.
My doubt is: why are the coordinates of the left vertex $(a \cos \theta, a \sin \theta)$? Thanks in advance.

You can draw a right-angled triangle to explain this. For a point in the second quadrant, as you have drawn it here, drop a perpendicular from your point $P$ to the $x$-axis, meeting it at $Q$. Then $OPQ$ is right-angled with $\angle POQ=\pi-\theta$. Therefore $|PQ|=a\sin(\pi-\theta)$ and $|OQ|=a\cos(\pi-\theta)$. Then $P$ has coordinates $$(-a\cos(\pi-\theta),a\sin(\pi-\theta))=(a\cos\theta,a\sin\theta).$$ Similar arguments work in each of the other three quadrants.