As you and Ahmad Bazzi already noticed the given equation is wrong. However, both of you already showed this issue I will not reproduce your results but going into more detail why I feel like there has to be a $x^{n-1}/n^2$ instead of the current $x^{n-1}/n~($to be precise I am also not sure about the $x^{n-1})$.
First of all let me introduce to you the Dilogarithm function $\operatorname{Li}_2(z)$ defined by a series very similiar to your one, and also to the one of the logarithm, namely
$$\operatorname{Li}_2(z)~=~\sum_{n=1}^\infty \frac{z^n}{n^2}\tag1$$
As you can see it is directly deducable from this series that we got $\operatorname{Li}_2(1)=\zeta(2)=\pi^2/6$. Anyway, there are some more nice properties about this function, e.g. an integral representation and functional equations. Right now we are especially interested in the latter one. More precise we want to show the following equation
$$\operatorname{Li}_2(z)+\operatorname{Li}_2(1-z)~=~\frac{\pi^2}6-\log(z)\log(1-z)\tag2$$
This looks familiar, doesn't it? Yes, exactly! It is your given equation by setting $f(x)=\operatorname{Li}_2(x)$. However, as you may notice your series representation of $f(x)$ does not match the one of the Dilogarithm but I suppose there was a mistake made either by proposing the task or while transfering it. The other option would be that this example was chosen to be disproved. I will just continue with a proof of $(2)$ only relying on $(1)$ aswell as on the of the natural logarithm.
Lets begin by finding the derivative of $\operatorname{Li}_2(z)$ which can be found by differentiating the series representation $(1)$ termwise. Thus, we get
\begin{align*}
\frac{\mathrm d}{\mathrm dz}\operatorname{Li}_2(z)&=\sum_{n=1}^\infty \frac{\mathrm d}{\mathrm dz}\frac{z^n}{n^2}=\sum_{n=1}^\infty \frac{z^{n-1}}n=-\frac{\log(1-z)}z\\
\frac{\mathrm d}{\mathrm dz}\operatorname{Li}_2(1-z)&=\sum_{n=1}^\infty \frac{\mathrm d}{\mathrm dz}\frac{(1-z)^n}{n^2}=-\sum_{n=1}^\infty \frac{(1-z)^{n-1}}n=\frac{\log(z)}{1-z}
\end{align*}
On the other hand note that we can use the product rule to differentiate $\log(z)\log(1-z)$ which yields to
$$\frac{\mathrm d}{\mathrm dz}\log(z)\log(1-z)=\frac{\log(1-z)}z-\frac{\log(z)}{1-z}$$
In other words the derivatives of both sides alone equals each other which conversely implies that their anti-derivatives are in fact the same up to a constant. Reformulating this relation we get the following
\begin{align*}
\int -\frac{\log(1-z)}z\mathrm dz+\int\frac{\log(z)}{1-z}\mathrm dz&=\int-\frac{\log(1-z)}z+\frac{\log(z)}{1-z}\mathrm dz\\
\operatorname{Li}_2(z)+\operatorname{Li}_2(1-z)&=-\log(z)\log(1-z)+c
\end{align*}
To determine the constant $c$ we may just plug in $z=1$ to find that
\begin{align*}
\operatorname{Li}_2(1)+\operatorname{Li}_2(1-1)&=-\log(1)\log(1-1)+c\\
\operatorname{Li}_2(1)&=c\\
\therefore~c&=\frac{\pi^2}6
\end{align*}
Hence the identity $(2)$ has been proved. The here given proof is more or less the same as Lewin's in his Polylogarithms and Associated Functions. Now moreover note two things: firstly the identity only holds for the interval $[0,1]$ otherwise we will run into problems regarding the natural logarithm and secondly the series expansion $(1)$ only holds for $|z|<1$ $($the value at $z=1$ can be deduced nevertheless$)$.
Anyway, the question remains if it was intended by your teacher to give you a wrong equation or if there happend a mistake of transfering the task inbetween. In order to match equation $(2)$ $f(x)$ the terms should be given by $x^n/n^2$ rather than by $x^{n-1}/n$.