Question: how long does it take to get to each planet from earth?
Answer: Earth takes 365 days to travel one complete orbit, while Mercury takes 88 days and Venus takes 224 days, so the time between alignments will require each planet to make a whole number of orbits around the sun and return to the pattern you see in the figure above.