As stated in the problem, $£m$, or for simplicity's sake, $x_0$, is the loan amount. We want to derive an equation for $x_n$, which is the amount owed after $n$ years. That's why we make the loan amount $x_0$, because it is the amount owed after 0 years. We do this by writing it in terms of $x_{n-1}$, the amount owed from the previous year. Doing this is the same as writing a difference equation; they are the same thing.
We start with $x_n$:
$$x_n = ?$$
So we know that $x_{n-1}$ is the amount owed from the previous year. So we will say that $x_n$, the amount owed for the $n$th year, is related to $x_{n-1}$, the amount owed for the previous year:
$$x_n = f(x_{n-1}) = x_{n-1} + \text{adjustments}$$
We make 12 monthly payments of $m$, so we will subtract $12m$ from this:
$$x_n = x_{n-1} - 12m + \text{adjustments}$$
Then we are charged $r$ times the amount owed the previous year, which is $x_{n-1}$:
$$x_n = x_{n-1} - 12m + r\cdot x_{n-1}$$
That gives (i).
An alternate form of (i) can be obtained by just using arithmetic:
$$x_n = (1 + r)x_{n-1} - 12m$$
Using the information you gave, there are 2 key steps to do this.
Interest
So if we have $£x$, and we receive interest at a rate of $r$, we get $£x$ (our initial investment) + $£rx$ (the interest) (here we view the investment as a decimal).
So for example, if my bank was giving me $20\%$ interest, and I invest $£20$, then in total I would have
$£20 + £20\times0.2 = £24$.
An easier way to put this would be $£x(1+r)$.
Recurrences
We have that $a_n$ is the money from the $n-1$- th year along with interest, from above, we have that $$a_n = a_{n-1}(1+r).$$
Along with the initial condition $a_0 = P$, we can solve this.
One general way to solve recurrence relations, is to write them out until we see a pattern emerge.
So \begin{align}
a_n &= a_{n-1}(1+r)\\
&= a_{n-2}(1+r)^2\\
&\,\vdots\\
&= a_{1}(1+r)^{n-1}\\
&= a_0(1+r)^n\\
&= P(1+r)^n.
\end{align}
Thus we have solved the recurrence!
Recurrences with additional investment
What if I invested an additional $P$ each year? What is the recurrence equation and the formula? Is it $a_n = n P(1+r) + P$?
Not quite, let's apply the same technique. Each year, we would get interest and then also we would add in investment.
This makes it
$$a_n = a_{n-1}(1+r) + P.$$
By applying the same technique as above, we get that $$a_n = P \frac{(1+r)^{n+1} - 1}{r}.$$
Best Answer
Assume WLOG that monetary values are $'000.
Let
$r=$ interest rate $=0.1$,
$R=$annual repayment $=2$,
$a_n=$ outstanding mortgage balance at year $n$ after repayment at year $n$,
$P=a_0=$ opening mortgage balance $=40$.
The recurrence relation is $$a_n=a_{n-1}(1+r)-R$$ Rearranging gives $$\begin{align} a_n-\frac Rr&=(1+r)\left(a_{n-1}-\frac Rr\right)\\ &=(1+r)^2\left(a_{n-2}-\frac Rr\right)\\ &\qquad\vdots\\ &=(1+r)^n\left(a_{0}-\frac Rr\right)\\ a_n&=(1+r)^na_0-\frac Rr[(1+r)^n-1]\\ &=\left(P-\frac Rr\right)(1+r)^n+\frac Rr\\ &=20(1.1^n+1)\qquad\blacksquare \end{align}$$ which is the closed form solution for $a_n$.
Note that $a_n$ increases as $n$ increases, hence the outstanding mortgage balance will balloon over time and the mortgage will never be fully repaid.