The formula goes by:
Where I is interest, p is principal, R is rate and T is time.
In the question it says that interest is given monthly, so we have to convert the time(10 years into months)
Time=10 years × 12months= 120months
Now the formula
Interest= 5000×5×120 / 100
So the value in 10years is 5000 + 30000 = 35000
Dont forget your $ sign.