The strategy in linear programming is to find the corner points of the polygon of constraint. In this problem the constraining polygon is a quadrilateral with corner points:
(0,0) ; (1,0) ; (2,1) ; (0,2)
The P values at these points are:
0 ; 2 ; 7 ; 6
Therefore the maximum is P =7 occurring at (2,1) and
the minimum is P = 0 occurring at (0,0)
The basic idea is that the max (or min) of a linear objective function (such as P = 2x + 3y)
will be on the boundary of the constraining region. In this problem the constraint region is a polygon and the objective function has a different value at each corner. This implies that the maximum ( or minimum) must be
at a corner point.