Rectangle A has a width of 12 and a length of x. Rectangle B has a width of (x-2) and a length of 16. Find the value of x so that the rectangles have the same area.