Hi Anna,
If you don't have access to a LP calculator (there is one on most versions of Excel) then the way to solve this is to graph the region of interest which is bounded by the lines y=8-x and y=9-2x and x=0 and y=0 the two lines intersect at (1,7) this forma a polygonal region with vertices at (0,8) (1,7) (9/2,0) and (0,0).
Now there is a theorem in Linear Programming that says the max or min of a linear function (P=3x-2y) will occur at one of the vertices of the constraint region. So what you have to do is evaluate P at each of the vertices and choose the vertex that gives the largest P. That will tell you the values of x and y that maximize the function P.
Hope this helps
Jim