Is the constraint 3x+y≤18?
If so, we have a feasible region bounded by the intercepts and the line 3x+y=18.
Intercepts are (6,0) and (0,18). So to maximise p=18x+13y we need to plug in the two points:
(6,0): p=108; (0,18): p=234, so x=0, y=18 are the conditions for maximum.
More generally, if the constraint is 3x+ky≤18, where k is an unspecified constant, then the intercepts are (6,0) and (0,18/k). Plug in the points:
(6,0): p=108; (0,18/k): p=234/k. If 234/k>108 then k<234/108, k<13/6, and x=0, y=18/k are the conditions for maximum; otherwise x=6 and y=0 are the conditions. For example if k=2, y=9, x=0 gives max p=117; but if k=3 (k>13/6), then y=6 and p=78 which is not maximum, because 108 (x=6, y=0) is bigger. Check your constraint and compare it with 13/6 (2⅙); if it's bigger then p=108, otherwise p=234/k. (k is likely to be 1 or 2.)