Final answer:
Galvin bought a total of 40 books from the book fair; 25 fiction books and 15 non-fiction books based on the given ratios and the information about the number of books he read and had left.
Step-by-step explanation:
Let's assume the number of fiction books that Galvin bought is represented by the variable F, and the number of non-fiction books he bought is represented by N. We are told that Galvin bought 3/5 as many non-fiction books as fiction books, so that translates to the equation N = 3/5 * F.
After reading 6 non-fiction books and 13 fiction books, he has F - 13 fiction books left and N - 6 non-fiction books left.
The problem also states that he then had 3/4 as many non-fiction books left to read as fiction books left. This gives us another equation, (N - 6) = 3/4 * (F - 13). Substituting N from the first equation into the second gives (3/5 * F - 6) = 3/4 * (F - 13).
Multiplying both sides of the equation by 20 to clear the fractions gives 12F - 120 = 15F - 195. Rearranging the terms, we get 3F = 75. Dividing both sides by 3, we find that F = 25.
Now we can find N by substituting F back into the first equation: N = 3/5 * 25, which simplifies to N = 15.
Therefore, Galvin bought 25 + 15 = 40 books in total from the book fair.