A zookeeper gave bananas to a group of monkeys. If she gave 5 bananas to each monkey, she needed another 2 bananas. If she gave each monkey 4 bananas, there were 3 bananas left. How many monkeys were at the zoo?

5m-2 = 4n+3

5(m-1) = 4n
since 5*4 = 4*5,
m=n=5

23 = 25-2 = 20+3
so, 5 monkeys, 23 bananas