The perimeter of a square is 40 inches. The length of each side of the square is 4x-2 inches. What is the value of x? Show or explain how you found your answer.