One side of a triangle is 9 feet shorter than the second side. The third side is 2 feet longer than the second side. The perimeter of a triangle is 38 feet. Find the length of each side.