The square and the triangle have equal perimeters. (There is a picture of a square with one side shown as x-5 and there is a picture of a triangle with one side shown as 12 and the other two sides as x)

A. Find the value of x
B. Find the perimeter