How to solve this geometry problem? 
I have been given 2 squares here, and I supposed the ratio of (area of shaded region/ are of outer of square)
Obviously there are four right angled triangles here, once we have their size length we can calculate their are and get the final answer.
My book's answer says that all of the triangle 3-4-5 triangle, but I can't figure how to get the measurement of the base/altitude in triangle with altitude=3 and base=4 respectively. Can anyone tell me , How do I calculate the other side of triangles with given information.

$\sqrt{3^2+4^2}=?$ ${}{}{}{}{}{}{}{}$
