On the official solutions thread, the solution given for the 2nd part of question 6 is:
take y = pi - x.
=> dy = -dx. Substituting and noticing that sin x = sin(pi - x) gives that integral( xf(sin(x) ) = integral( (pi-x)f(sin x)).
We use this fact in evaluating I = integral(x/(1+sin x)). We get 2I = integral(pi/(1+sin x)). Hence I = pi/2.integral(1/(1+sin x)).
But if you make the substitution, you obtain integral(( pi -y) f(siny))dy. How can you just change the y's to x's???