To find A.), we must create a linear equation. Let b be the number of books Sam ordered. We write 5b because each book is 5 dollars. Then we add 4 dollars to the equation to represent the shipping fee. Then we write "equals to 89", because it says that is the total cost. So we get the equation

To find B.), we must solve the equation. Isolate the variable, by subtracting 4 from both sides. We then get
. Now we divide by 5 to get only the variable and to get rid of the coefficient. We get
. So Sam bought 17 books.