.
Let x be the Grandfather age.
Then you have this equation from the condition
= x.
Multiply both sides by 7*12 = 84 to rid of denominators
12x + 7x + 56x + 9*84 = 84x,
75x + 9*84 = 84x,
9*84 = 84x - 75x ====> 9*84 = 9x ====> x = 84.
Answer. Grandfather was 84 years old.
Notice that 7*12 = 84, therefore, one could suggest/guess the answer without calculations.
To wider your horizon, there is very similar poetical mathematical legend from ancient times for the same theme and melody.
http://mathworld.wolfram.com/DiophantussRiddle.html
Also see these links in this forum
https://www.algebra.com/algebra/homework/word/age/Age_Word_Problems.faq.question.244899.html
https://www.algebra.com/algebra/homework/word/age/Age_Word_Problems.faq.question.427066.html