For the maximum, I started off by adding up all the integers. 1+2+3...+10=55.
So with that I gave a variable to each group, x and y.
Thus, x+y=55, then I switched that to a slope intercept form, so y= -x+55
So that gave me P= y * x, which I then simplified to P= x* (-x+55), which became -(x^2-55x)
Then we can complete the square to get -(x^2-55x+765.25), and that simplified is -(x-27.5), so 27.5* 27.5 will give us the highest number, but since we only have intergers we can go +1 and -1 to get 27*28 and that will equal 756.