a person has debt of R2000 due in 2 years and R4000 due in 5 years.The interest rate is 15% compounded quarterly.If R1000 is paid today and the balance in 3 years, what is the balance that must be paid to discharge the debt taking 3 years from today as focal date?

Here is how I taught this stuff 45 years ago.

Draw a time line from time = 0 (now) to time = 5
On top of the line,
at year 2, put in 2000
at year 5, put in 4000

below the line,
at year 0 or at "now", put 1000
at year 3 , put in x

quarterly rate = .15/4 = .0375

Now form your equation by setting the value of the payments equal to the value of the debts with year 3 at the focal date.

x + 1000(1.0375)^12 = 2000(1.0375)^4 + 4000(1.0375)^-8

you do the arithmetic