Answer:
8 books; 4 from each shelf
Step-by-step explanation:
let x represent equal number of books from each shelf
from shelf A = 40 -x
from shelf B = 16 -x
shelf A has 3 times as many books than shelf B
3(16- x) = 40 -x
48 -3x = 40 -x
48 - 40 = -x + 3x
8 = 2x
x = 4
altogether she borrowed 4 + 4 = 8 books