Answer
$x=21$
$y=7$
$P=147$
Work Step by Step
Quadratic function in standard form:
$y=a(x-h)^2+k$, in which $(h,k)$ is the vertex. And, the maximum (or the minimum) occurs at the vertex.
Two positive real numbers: $x$ and $y$
$x+3y=42$
$x=42-3y$
Product:
$P=xy$
$P=(42-3y)y=42y-3y^2$
$P=-3(y^2-14y)$
$P=-3[(y^2-2(7)y+7^2)-7^2]$
$P=-3(y-7)^2+147~~$ (Notice that: $a=-3$. Parabola opens downward.)
So the vertex $(7,147)$ is the maximum.
$x=42-3(7)=21$