A triangle has side lengths of 3x, 24, and 5x. The side with 5x is the longest side. What value of x would make a right triangle?​