(h times c divided by lambda)^2 does not equal (h divided by lambda times c)^2 because with (h divided by lambda times c)^2 you multiply the denominator and numerator by c while with (h times c divided by lambda)^2 you only multiply the top. It is not nonsense, it's simple order of operations PEMDAS
NO! You DON'T multiply the denominator by c Sorry...you are mistaken...
(hc/l)2 is exactly the same as (h/l *c)2
= h2c2 / l2