Write and solve an equation to answer the problem.
Greg's age is 3 years less than twice Teri's age. The sum of their ages is 30. Find their ages.