Jessica is 2 years older than Maggie. The sum of their ages is 26. Define variables and write an algebraic equation to represent the situation.