It is also given that $f$ is a continuous function.
Specifically, the question tasks to use the substitution $x=\pi - t$. However, I don't seem to be able to get anything useful out of this substitution:
$$ \begin{align} \int_0^\pi xf(\sin x)dx&=\int_\pi^0 (\pi -t)f(\sin (\pi - t)) (-dt)\\&=-\int_\pi^0 (\pi -t)f(\sin (t))dt\\&=\int_0^\pi (\pi -t)f(\sin (t))dt \end{align} $$
Then:
$$\begin{align}\int_0^\pi (\pi -t)f(\sin (t))dt&=\int_0^\pi \pi f(\sin (t))dt - \int_0^\pi tf(\sin (t))dt\\&=\pi\int_0^\pi f(\sin (t))dt - \int_0^\pi tf(\sin (t))dt \end{align} $$
However here is where I'm lost. By putting back $t=\pi-x$ I'm just reversing the process which puts me right back where I started, leaving me with no clue on how to continue. I also tried to use integration by parts on the last result, but it didn't look like it would yield anything of value.
My gut is telling me that I should be able to somehow get something in the lines of:
$\int_0^\pi xf(\sin x)dx=\pi\int_0^\pi f(\sin (x))dx - \int_0^\pi xf(\sin (x))dx$
then I would move $\int_0^\pi xf(\sin (x))dx$ to the other side and get the desired result. But I'm stuck with the substituted $t$ variable instead.
Any hints would be appreciated, thanks in advance.
NOTE: I've seen other answers which use:
$\int_0^\pi f(x)dx=\int_0^\pi f(0+\pi-x)dx$
but the question specifically asks to use $x=\pi - t$.