Hey, I'm the not so bright guy saying, its all about common knowledge. Look at the triangles? Did your teacher or resource say the equation a2+b2=c2 only works for right triangles?
In geometry, (the part of the course i practically failed) you can find right triangles in the first triangle, just by making it look like there is. When you, figured out to put a line in the middle you would need an equation.
The x in your diagrams are defined as a variable. you need that variable to be able to plug into your equation. Then its all about putting the pieces together.
When i had problems like these i usually refer to my notes seeing if i had any other info on triangles. At that time i didn't know cosine law and sine law, but's that's a different ball league.
--------------------------------------------------------------
I'm not so bright and yet i practice my studies and homework to be the 80% dude.
--------------------------------------------------------------
An hour a day keeps the teacher away (from looking at your homework)