There are 2 possible triangles that fit the description:
The Pythagorean theorem says this:
(leg)2 + (other leg)2 = (hypotenuse)2
The hypotenuse is the side formed by the 90º angle.
So...if your triangle is the first one, that means:
(AB)2 + (4)2 = 62
(AB)2 + 16 = 36
(AB)2 = 36 - 16
(AB)2 = 20
(AB) = +\(\sqrt{20}\)
If you need more help please say so :)