Let m and b represent the numbers of math and biology books sold, respectively. The problem statement tells you ...
... m + b = 266
... m - b = 54 . . . . . . . 54 more math books were sold
Adding these two equations gives you ...
... 2m = 320
... m = 160 . . . . . divide by 2
... b = 160 -54 = 106 . . . . 54 fewer biology books were sold.
160 math textbooks and 106 biology textbooks were sold in a week.