Explanation:
Let w = width and h = height. Then we have
w = 3*h - 17
and
4*w + h = 30 (4 shelves and 1 sides).
Plug in the first equation into the second and solve for h:
4*(3*h - 12) + h = 30
12*h - 48 + h = 30
13*h = 78
h = 78/13
h = 6
Plug that in the first equation to find w = 3*6 - 17 = 1
So width = 1 feet.
height = 6 feet