There are two bookshelves, $A$ and $B$. If $A$ gives $B$ $40$ books, then they would have the same number of books. However, if $B$ gives $A$ $40$ books, then the amount of books of $A$ is $3$ times that of $B$. How many books did bookshelf $A$ have originally? 
Overseas Competition->Knowledge Point->Word Problem Modules->Questions Involving Sum, Difference and Multiples->Problems of Difference and Multiple