p = f*s
f +3s = 60
p = (60 -3s)*s = 3(20 -s)*s
This equation describes a parabola that opens downward. The roots of the equation are s=0 and s=20, so the axis of symmetry is s=(0+20)/2 = 10. That is, the vertex (maximum) will be found at s=10.
The second number is 10. The first number is 60-3*10 = 30.
The product is maximized when the first number is 30 and the second is 10.