The objective function is z=px+qy.
When a linear function has its maximum at two different points, both points must give the same maximum value.
At point (2,1):
z=p(2)+q(1)
z=2p+q
At point (0,6):
z=p(0)+q(6)
z=6q
Since both points give the maximum value, they must be equal:
2p+q=6q
2p=6q−q
2p=5q
Therefore, the relationship between p and q is 2p=5q.