Simplifying a composite function

I'm studying A-Level maths and a question that's come up in my textbook for Core 3 relates to composite functions. I believe I've got the correct answer but in the textbook it looks as if I haven't simplified the answer sufficiently. The question was as follows:

If $f(x)=x/(1-x)$ find $f(f(x))$

My answer was $$\frac{\frac{x}{1-x}}{1-\frac{x}{1-x}}$$ The listed solution simplifies the answer I got, as follows: $$\frac{\frac{x}{1-x}}{1-\frac{x}{1-x}}= \frac{x}{(1-x)-x}=\frac{x}{1-2x}$$

Apologies if this is basic stuff, but I don't quite follow how they've gone from $$\frac{\frac{x}{1-x}}{1-\frac{x}{1-x}}$$ to $$\frac{x}{(1-x)-x}$$ Would someone be able to explain?

• The denominator $1-\frac{x}{1-x}$ is equal to $\frac{(1-x) - x}{1-x}=\frac{1-2x}{1-x}$. Now $\frac{\frac{x}{1-x}}{\frac{1-2x}{1-x}}=\frac{2}{1-x}\cdot\frac{1-x}{1-2x}=\frac{x}{1-2x}$. – orole Feb 6 '18 at 16:27
It's $$\frac{\frac{x}{1-x}}{1-\frac{x}{1-x}}=\frac{\frac{x}{1-x}\cdot(1-x)}{\left(1-\frac{x}{1-x}\right)(1-x)}=\frac{x}{1\cdot(1-x)-\frac{x}{1-x}\cdot(1-x)}=\frac{x}{1-x-x}=\frac{x}{1-2x}$$