Believe it or not, :), the width of the ribbon needs to be known to get the right answer. If the ribbon had an infinitely small width the ribbon needed would just be the perimeter.
P=2(L+W)
P=2(12+15)
P=54 in
However an infinitely small width is not something that has any practical application. For example, if the width of the ribbon were 1/2 in.
P=2((L+1)+W)
P=2(16+12)
P=56 in So the perimeter increased by 2 in when the ribbon was only 1/2 in wide.
The "infinitely small" width and the perimeter of 54 in is only a decent approximation if the ribbon were a very thin string.