Well, just by seing those numbers 3 4 5 I knew it is 90°. This triangle with sides ratio of 5:4:3 is wellknown as the Pythagorian triangle.

You always want to know everyting about the figure you are looking at. If you know all the sides of a triangle it is logical to ask yourself what are its angles. Especially having a 90° angle helps a lot, as you can see i this case, so you should always have that in mind.
And even if you don't know that angle, you can still find the answer, there are many ways to do it, I am showing you the simplest way. Actually the problem might have been wit sides a, b and c with nothing else, then there still exists a solution. I can actually give that to you.
Again, you have to go through the area of the triangle, because there you can find many connections between the sides.
For example, for the area you have S= AB* hc/2
From Heron's formula you can express the area through the sides of a triangle, in our case we know them.
So the area is [tex]\sqrt{p(p-a)(p-b)(p-c)}[/tex], where p=[tex]\frac{a+b+c}{2}[/tex], in other words p is ½ of the perimeter.
Now if we compute p in the simple case, it is (3+4+5)/2=6, so for the area we get
[tex]S=\sqrt{6(6-5)(6-4)(6-3)}=\sqrt{6*1*2*3}=\sqrt{36}=6[/tex] and from here we have S=6=AB*h/2=5x/2 => x=6*2/5=12/5
If you look at the general case with sides a,b,c you find [tex]S=\sqrt{p(p-a)(p-b)(p-c)}=\frac{AB*CH}{2}[/tex] and from here you get
[tex]CH=\frac{2\sqrt{p(p-a)(p-b)(p-c)}}{AB}[/tex] where again [tex]p=\frac{a+b+c}{2}[/tex]
Now you know all the things on the right and you just compute it for every given numbers.
The essence here is to know how to find connections between different ellements of a triangle. It doesn't matter which ellements are given, if you have 3 ellements you can find theoretically everything else. The problem is which formulas to use.
So knowing formulas helps here. There are formulas for the angles, for the medians, for the angles, for the radii and so on.
Many of them go through the area, like here we did.
I hope that explanation helps