The side of a square are all the same length. Each side is 3x + 2 cm long. If the perimeter of the square shown is 56cm find the value of x.