The expansion of $(x+a)^{n}$ contains $(n+1)$ terms.
To find the $r^{\text{th}}$ term from the end,we observe the pattern:
$1^{\text{st}}$ term from the end is the $(n+1)^{\text{th}}$ term.
$2^{\text{nd}}$ term from the end is the $n^{\text{th}}$ term.
$3^{\text{rd}}$ term from the end is the $(n-1)^{\text{th}}$ term.
In general,the $r^{\text{th}}$ term from the end is the $(n+1)-(r-1) = (n-r+2)^{\text{th}}$ term from the beginning.
The general term of $(x+a)^{n}$ is given by $T_{k+1} = ^{n}C_{k} x^{n-k} a^{k}$.
For the $(n-r+2)^{\text{th}}$ term,we set $k+1 = n-r+2$,which gives $k = n-r+1$.
Substituting $k = n-r+1$ into the general term formula:
$T_{n-r+2} = ^{n}C_{n-r+1} x^{n-(n-r+1)} a^{n-r+1} = ^{n}C_{n-r+1} x^{r-1} a^{n-r+1}$.