You'll need to use calculus for this
P = xy
P = (8-2y)y = 8y - 2y^2
Differentiate now
P' = 8 - 4y
Now to find if this is the maxima or minima, you'll need to get the second order derivative, and if it's negative then it's maxima, if positive then minima
P'' = -4 which is negative. So the value you'll get is the maximum value, not the minimum
Now equate P' to 0 to get the critical points
P' = 8-4y = 0
y = 2
x = 8-2y = 4
These are the real numbers. And the product will be 8, the maximum product