3. Each participant in the school charity event brought either one encyclopedia, or three fiction books, or two reference books. In total, 150 encyclopedias were collected. After the event, two bookshelves in the library were filled, with an equal number of books on each. On the first shelf, there was one fifth of all the reference books, one seventh of all the fiction books, and all the encyclopedias. How many participants were there in the event, and how many books did they bring in total?
Solution. Let $x$ be the fifth part of the reference books, $y$ be the seventh part of all fiction books. Then on the first shelf, there are $-x+y+150$ books, and on the second shelf, there are $-4x+6y$ books. From the condition of the problem, the number of books on the shelves is equal, therefore, $x+y+150=4x+6y$, from which $3x+5y=150$. But the number of reference books is a multiple of 2, and the number of fiction books is a multiple of 3, i.e., $x=2k, y=3n$. Then the equation takes the form: $6k+15n=150$. Solving in natural numbers: $n=10-\frac{6}{15}k$, therefore, $k=15, n=4$, from which $x=30, y=12$. Finally, we get that a total of 150 reference books were brought by 75 participants, 84 fiction books were brought by 42 participants. Thus, 267 people participated in the campaign, bringing 384 books.

Answer: 267 people, 384 books.