let the first number be x and the 2nd number be y.
Set up algebraic equations based on the information given
x = 2+ 3y
x + y = 25
Solve these simultaneously to get x=77/4 and y = 23/4.
If you have trouble solving these equations, let me know.