Why does the inequalities of triangles property not work here? Using that property doesn’t it mean that any two sides of a triangle added up should be greater than the third side?

You can say that p + m > n using the triangle inequality indeed. But that doesn’t imply that their squares follow the rule.

As leader board said : you can say that : p+m>n ->but squaring on both side will result in (a+b)^2 identity for LHS