Find the value of P if the line joining (P, 4) and (6, -2) is…