Country A has elections every 4 years with its first election in 1997. Country B has elections every 5 years with its first election in 1994. When would be the first time that both the countries will have election in the same year?
Work so far: I have arrived at the diophantine equation $$1997 + 4n_1 = 1994 + 5n_2$$ or $$5n_2-4n_1 = 3$$ Is there an easier way to solve this or is solving the diophantine equation the only way. Please give detailed solution.