Answer
$$2+2 \pi$$
Work Step by Step
Since, $ds=\sqrt {(\dfrac{dx}{dt})^2+(\dfrac{dy}{dt})^2} dt$
We have: $x= \cos t \implies \dfrac{dx}{dt}=- \sin t$
and $y= \sin t\implies \dfrac{dy}{dt}= \cos t$
So, $P(x,y) =ds=\sqrt { \sin^2 t+ \cos^2 t }dt= \ dt$
The mass of a spring can be computed as:
$\int_C \rho \ ds= \int_{0}^{\pi} (\cos t +\sin t+2) \ dt \\= (\sin t-\cos t +2)_{0}^{\pi} \\=1+1+2\pi \\=2+2 \pi$