This is a financial mathematics problem:
On time $0$ we have to pay $297505.48$ of a loan. Assuming a capitalization interest of $8\%$ and a fixed annual payment of $49623.55$, how many payments will yet be necessary, and what will be the amount of the last payment?
I could find the answer guessing, but as a newbie in financial mathematics I'd like to understand how to face such kind of problem in a methodical way. To find a solution I think I might first approximate $n$ in
$$49623.55\frac{1.08^n-1}{0.08} = 297505.48(1.08)^n$$
then truncate $n$ to its integer and proceed with
$$297505.48(1.08)^n - 49623.55\frac{1.08^n-1}{0.08} = x$$
so I could finally say "I have to do $n$ more payments of $49623.55$ and a final payment of $x$". My first problem is I don't know how to solve the first equation, and the second one is that I have the feeling I might be facing the problem in an impractical way. How should I solve this exercice?
First, divide through by $1.08^n$ to get $$49623.55\frac{1-1.08^{-n}}{0.08} = 297505.48$$ Then a little manipulation gives $$1.08^{-n}=1-.08{297505.48\over49623.55}\approx0.52038017$$ and $$ n \approx -{\log{.52038017}\over \log{1.08}}=8.487354494309074$$
Truncating to an integer, we would take $n=8.$ Your method of computing the residual payment looks correct to me.