Step 1: Write the differential equation in linear form.
The equation is
\[
\frac{dy}{dx}+P(x)y=Q(x),
\]
where
\[
P(x)=2(x-1)\sin x+x(x-2)\cos x.
\]
Observe that
\[
P(x)
=
\frac{d}{dx}
\left(x(x-2)\sin x\right).
\]
Hence,
\[
\text{I.F.}
=
e^{\int P(x)\,dx}
=
e^{x(x-2)\sin x}.
\]
Step 2: Multiply by the integrating factor.
Multiplying the equation throughout by the integrating factor,
\[
\frac{d}{dx}
\left[
y\,e^{x(x-2)\sin x}
\right]
=
e^{x(x-2)\sin x}
\cdot
\frac{e^{2x\sin x}}{e^{x^2\sin x}}.
\]
Since
\[
x(x-2)+2x=x^2,
\]
the right-hand side becomes
\[
1.
\]
Thus,
\[
\frac{d}{dx}
\left[
y\,e^{x(x-2)\sin x}
\right]
=
1.
\]
Step 3: Integrate and use the initial condition.
Integrating,
\[
y\,e^{x(x-2)\sin x}
=
x+C.
\]
Given,
\[
y(\pi)=0,
\]
therefore,
\[
0=\pi+C.
\]
Hence,
\[
C=-\pi.
\]
Thus,
\[
y\,e^{x(x-2)\sin x}
=
x-\pi.
\]
At
\[
x=2,
\]
\[
e^{2(2-2)\sin2}=e^0=1.
\]
Hence,
\[
y(2)=2-\pi.
\]
Therefore,
\[
\boxed{2-\pi}
\]
is the correct answer.
Thus,
\[
\boxed{(A)}
\]
is the correct answer.