X/21 = 3/63
63x = 21 * 3
63x = 63
x = 63/63
x = 1
Answer:
https://mathworld.wolfram.com/RuffinisRule.html
This may help you
Use present value equation.
If present value of annuity equals 400,000, then you are indifferent.

where v = 1/(1+r) and A = annual payment = 800,000/20 = 40,000
PV = 400,000
After subbing in the numbers, the equation is:

Therefore at interest rate of about 7.75% you are indifferent.
Let y represent the yellow and x the red.
Y= 3x-5 is your equation