They dont show you this because not even the teachers know this. They dont actually know why we use these equations, they just make use them. The fucking fucked up American school system.
I'm Irish and doing my junior cert this year and my epic maths teacher showed us this way but unfortunately it will be marked wrong if I use it in my exam. Yeah fuck you (It's called the theorem of pythagoras)
But calling it Pythagoras theorem means you know about the philosopher it was named after :O Shoutout to knowledge.