If P(2, m) is the midpoint of the line joining Q(m, n) and R(n, -4),…