The perimeter of an equilateral triangle is 4 inches more than the perimeter of the square, and the side of the triangle is 5 inches longer than the side of the square. Find the side length of the square and triangle