The perimeter of a triangle is 24 inches. The sum of the lengths of the first sides of the triangle exceeds the length of the third side by 4 in. Twice the length of the first side increased by the length of the second side is equal twice the length of the third side. Find the lengths of the sides of the triangle