Let us consider the full pie to be 1.
Part that Krishh had = 512
Part that Ferdie had = 29
The LCM of 12 and 9 is 36.
∴ The total part consumed by both of them = 5×312×3+2×49×4
=15+836=2336
∴ Part of apple pie remaining = 1−2336=1336
Krishh had 512 part of an apple pie. Ferdie had 29 part of the same pie. What part of the pie was left after both of them had it?