Question: There are two jars of beans, jar1 and jar2. Jar1 has green beans and Jar2 has red beans. After moving two-fifth of green beans from Jar1 into Jar2, two jars have equal
amount of beans. If the number of red beans is n, what is the number of the green beans originally?

Solution:

Let a be the number of green beans in jar1 originally. Let b be the number of red beans in jar2 originally. After moving 2/5 green beans from jar1 into jar2, Jar1 left [a - (2/5) a] beans
and jar2 left [b + (2/5) a] beans. Now the two jars have the equal amount of beans, so [a - (2/5) a] = [b + (2/5) a]. Solve this equation, we get a = 5b. Therefore, if the number of red beans is n,
then the number of green beans is a = 5n originally.