Since, △ABC is a right angled triangle. We can apply Pythagoras' Theorem to find the length of AB.
According to Pythagoras’ theorem, “In a right angled triangle: The square of the hypotenuse is equal to the sum of the squares of the other two sides.”