Marginal output of capital MPY = 25 * (x/y) (3/4)
The conditions for maximizing output are:
MPx/MPy=Px/Py
That is 3*(y/x)= 15/25.
At the same time should be satisfied
15x+25y=5000
Solve these two equations and get x and y.