A square and an equilateral triangle have the same perimeter.  Each side of the square is 2 less than the side of the triangle.  what is the value of the unknown variable? ​