The perimeter of a triangle is 42 inches. One side measures 18 inches. The shortest side measures x inches. The longest side measures 1 inch less than four times the length of the shortest side. Write and solve an equation to find the length of the longest side.