Answer:
did you draw a diagram to understand?
you have 4 inches on each side of the 1st and last painting
you have 6 inches of space between the 8 tables, so you have 7 spaces of 6 inches
each painting is 1012 inches wide
wall width:
4*2 + 7*6 + 1012*8 = 8146inches