There's only constraint (apart from x and y both being positive), so mark the x and y intercepts of 3x+y=18:
x intercept=18/3=6; y intercept=18. These, together with the origin (0,0), and noting that the feasibility region is to the left of the line and bound by the axes. We need the maximum p so ignore the origin.
(6,0): p=30x+12y=180
(0,18): p=216
So max p is when x=0, y=18.