The maximum value of z occurs at two corner points: (15,15) and (0,20).
In linear programming, when the maximum occurs at two corner points, both points give the same maximum value of z and the objective function line is parallel to the edge joining these two points.
At point (15,15):
z=2p(15)+q(15)
z=30p+15q
At point (0,20):
z=2p(0)+q(20)
z=20q
Since both points give the maximum value:
30p+15q=20q
30p=20q−15q
30p=5q
6p=q
Therefore, the relation between p and q is q=6p.