For 3 side lengths to form a triangle the sum of two random sides must be bigger than the third side and their differences must be smaller than the third side.
For the side lengths to form a right triangle they have to obey the Phythagorean Theorem which when paraphrased says " the square of the longer side is equal to the sum of the squares of the other sides"