Answer
$y(\theta)=2sin\theta+2\sqrt {15+sin^2\theta}$
Work Step by Step
Step 1. Identify the quantities: length of the arm $8in$, radius of the circular motion $2in$
Step 2. Assume the position of P is $y$, in the triangle formed by the crankshaft and the y-axis, use the Law of Cosines, $8^2=y^2+2^2-2\times2\times y\times cos(\frac{\pi}{2}-\theta)$ where angle $\frac{\pi}{2}-\theta$ is the complement of $theta$ and is the angle inside the triangle.
Step 3. Rewrite the above quadratic equation as $y^2-4y\cdot sin\theta-60=0$
Step 4. Solve the above equation to get $y=2sin\theta\pm2\sqrt {15+sin^2\theta}$, as when $\theta=\frac{\pi}{2}$, y=8, we choose the $+$ sign to get $y(\theta)=2sin\theta+2\sqrt {15+sin^2\theta}$