The slope of the tangent line to [tex]y=3\sin^2\dfrac x2[/tex] is
[tex]y'(x)=3\sin\dfrac x2\cos\dfrac x2=\dfrac32\sin x\implies y'(\pi)=0[/tex]
which means the tangent line at this point is horizontal.
Because the tangent line passes through
[tex]y(\pi)=3\sin^2\dfrac\pi2=3[/tex]
the tangent line has equation [tex]y=3[/tex].