Finding $f(x)$ when given a composite function? CONTEXT: Uni homework question made up by lecturer

If, for $n=0$, $1$, $2$, $\ldots$ you're given $f_0(x)=\frac{1}{2-x}$ and $f_{n+1}=f_0(f_n(x))$, how do you prove that your formula for $f_n(x)$ is correct by mathematical induction?

UPDATE

I have computed the first few terms:

$f_1(x)=\frac{2-x}{3-2x}$

$f_2(x)=\frac{3-2x}{4-3x}$

$f_3(x)=\frac{4-3x}{5-4x}$

$f_4(x)=\frac{5-4x}{6-5x}$

Then, from observation of these I developed:

$f_n(x)=\frac{n+1-nx}{n+2-(n+1)x}$

But I don't see how you're supposed to prove this with mathematical induction as it has variable $x$ in it as well as the $n$.
Said in very broad terms, induction is the process of solving some problem for all values of $n$ when you can solve it for some $n_0$ and can derive the solution of the problem $n+1$ knowing the solution for $n$.

In your case, the problem is to "find the symbolic expression of $f_n(x)$", which you managed perfectly.



$$f_0(x)=\frac{n+1-nx}{(n+2)-(n+1)x}=\frac{1}{2-x}$$ is true.

And

$$f_n(x)=\frac{n+1-nx}{(n+2)-(n+1)x}\implies f_{n+1}(x)=f_0(f_n(x))=\frac{n+2-(n+1)x}{(n+3)-(n+2)x}$$
is true as well, as is shown by reworking the expressions.
Just calculate $f_{n+1}$ from $f_{n}$, with both depending on x and check if the pattern holds. The variable x is irrelevant in this case, as you perform your induction on n.

Or, if you prefer it in these words for better understanding, the "pattern" has to still be true for every value of x