(36-x)( 1- 1/8) This is the existing quantity of the first bookshelf.
X+ 1/8(36-x) This is the existing number of the second bookshelf.
2/3[x+ 1/8(36-x)]26 =(36-x)( 1- 1/8)
Solving x is the answer. I asked x if it doesn't seem to be an integer, but the equation should be ok.