Let their ages be g and k. Then g = k + 3.
Next: (g+7) + (k+7) = 41.
Substituting k + 3 for g in the above equation, we get k + 3 + 7 + k + 7 = 41.
Combining like terms: 2k + 17 = 41. Then 2k = 24, and k = 12.
Kevin is 12 years old and Greg is 15 years.