Let us say that Gregory is q years old now. 4 years ago he was (q - 4) years. Using the information of the problem, we formulate the equation:
After 4 years, he will be (q + 4) years old. Using the previous equation:
Gregory will be (p + 8) years old 4 years from now.