Pythagorean theorem: word problems