This is a fairly easy question. Just use the Pythagorean Theorem:
Leg squared + Leg squared = Hypotenuse squared.
In symbols: L² + L² = H²
So if you want to find out if a triangle is a right triangle, just plug in the numbers:
12² + 35² = 37²?
144 + 1225 = 1369?
1369 = 1369, so yes, the lengths of 12 cm, 35 cm, and 37 cm could be the lengths of a right triangle.
Hope I answered your question!