Step 1: Look for a clean way to split the integrand.
The integrand is $\frac{\sin x - x\cos x}{x(x + \sin x)}$. We hunt for two simpler fractions whose difference gives this, ideally each being the derivative of a logarithm.
Step 2: Propose the split.
Claim: $\frac{\sin x - x\cos x}{x(x + \sin x)} = \frac{1}{x} - \frac{1 + \cos x}{x + \sin x}$.
Step 3: Verify the split quickly.
Combine the right side over $x(x + \sin x)$: numerator $= (x + \sin x) - x(1 + \cos x) = x + \sin x - x - x\cos x = \sin x - x\cos x$. This matches exactly, so the split is correct.
Step 4: Recognise each piece as a log derivative.
$\frac{1}{x}$ is the derivative of $\ln x$. And $\frac{1 + \cos x}{x + \sin x}$ is the derivative of $\ln(x + \sin x)$, since the top is exactly the derivative of the bottom.
Step 5: Integrate.
So the antiderivative is $\ln x - \ln(x + \sin x) = \ln\frac{x}{x + \sin x}$.
Step 6: Apply the limits $\frac{\pi}{2}$ to $\pi$.
At $x = \pi$: $\sin\pi = 0$, value $= \ln\frac{\pi}{\pi} = \ln 1 = 0$. At $x = \frac{\pi}{2}$: $\sin\frac{\pi}{2} = 1$, value $= \ln\frac{\pi/2}{\pi/2 + 1}$. The integral is $0 - \ln\frac{\pi/2}{\pi/2 + 1} = \ln\frac{\pi/2 + 1}{\pi/2} = \ln\left(1 + \frac{2}{\pi}\right)$.
\[ \boxed{\log\left(1 + \tfrac{2}{\pi}\right)} \]