Interest rate, Differential Eq problem.

I encounter with one of the textbook problem that I don't know how to approach.

Here's the queston:

A home buyer can afford to spend no more than $800/month on mortage payments. Suppose that the interest rate is 9% and that the term of the mortgage is 20 years. Assume that interest is compounded continuously and that payments are also made continuously.
a) Determine the maximum amount that this buyer can afford to borrow.
b) Determine the total interest paid during the term of the mortage.

Right now I have no idea on how to setup this problem, so I hope I can get some pointers here.

I'm sorry, but that do you mean by "definitions of the relevant quantities?"
That was the complete question; all I know is I should use first order equations to solve this problem (because this question is under that section.)

You must have some idea of how to set up the problem if you are working with differential equations!

The rate at which the principal grows, dP/dt, is proportional to the principal but it is also being diminished at a fixed rate (the constant rate at which payments are being made). Can you express that as a differential equation? What can you learn from solving the ODE?

Here's how I would do it: If the principle at time T (in years) is X(T) then the annual interest is 0.09X and the payments would be 12(800)= 9600 (per year). Let h be some fraction of a year. Then the interest would be 0.09hX and the payments would be 9690h. The change in the principle would be
X(T+h)- X(T)= 0.09hX- 9600h. Dividing by h gives (X(T+h)- X(T))/h= 0.09X- 9690. Finally, taking the limit as h goes to 0, we get the differential equation dX/dt= 0.09X- 9600.