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.

Well, the obvious answer is that they are all $3,4,5$ triangles, but how might we see that?
Let's look at the angles which meet at the corner between the marked $3$ and $4$. Let the angle in the triangle with $3$ be $\alpha$, then the angle in the triangle with $4$ which is $90^{\circ}-\alpha$ because the unshaded area is a square and all its angles are right angles. You can trace the angles round and see that all the triangles are similar. And the fact that the outer figure is a square means they are all the same size (congruent).
Once that is established - and I agree that it needs to be checked, rather than assumed - you can use the $3,4,5$ fact with confidence.
