We know that if m and n are parallel, then we know that they have the same slope. We can call it x in this case.
Since we know that p is a perpendicular transversal, then we know it is the opposite and reciprocal of m. Therefore, we can label it as -1/x.
Since p = -1/x and n = x, we can tell they are perpendicular.