a sum of money amounts to rs. 789 in two years and 1230 rupees in seven years. find the principal and the rate

P(1+r)^2 = 789

P(1+r)^7 = 1230
divide the 2nd by the first
(1+r)^5 = 1.558935361
take 5th root of both sides ....
1+r = 1.09286, keep all decimals if you want
r = .09286 <--- the annual rate is 9.286%

sub into P(1+r)^2 = 789
P = 660.61