There are three times as many fiction books as non-fiction books in a library. 120 fiction and 24 non-fiction books are loaned out. There are now twice as many non-fiction books as fiction books. How many books were in the library?
How do I work this out step by step?