Question 362402
P = xy, if x + 3y = 42.
From the given, x = 42-3y.  Substitute into P = xy:
P = (42 - 3y)y, or
{{{P = -3y^2 + 42y = -3y(y-14)}}}.  
This is a quadratic equation whose graph is a parabola facing downward, hence it has a MAXIMUM.  The roots  are 0 and 14.  The maximum happens when y = 7, the average of the two roots.  Therefore x = 21.  The 1st number is 21, and the 2nd, 7.