Solve word problems leading to linear equations

Of the 1200 books in the library, there are 3 times as many books in the fiction section as are in the nonfiction section. Also, there are 400 more books in the reference section than are in the nonfiction section. How many books are in each section?

Let's assume the number of books in the nonfiction section is x.

According to the problem, there are 3 times as many books in the fiction section as in the nonfiction section, which means there are 3x books in the fiction section.
There are also 400 more books in the reference section than in the nonfiction section, so there are x + 400 books in the reference section.
The total number of books in the library is the sum of the number of books in each section: x + 3x + x + 400 = 1200.
Combining like terms, we get 5x + 400 = 1200.
Subtracting 400 from both sides, we have 5x = 800.
Dividing both sides by 5, we get x = 160.
Therefore, there are 160 books in the nonfiction section, 3(160) = 480 books in the fiction section, and 160 + 400 = 560 books in the reference section.