x+y=200 ①
x=3y- 16 ②
Bring ② into ① to get 3y+y- 16=200, y=54.
Bring y=54 into ① to get x= 146.
* * * That is, shelf A has 146 books and shelf B has 54 books.