"go pear-shaped" is a set expression meaning go wrong, go bad. "or burger-shaped" is the writer's little wordplay. "how he worked that out" means how he determined/decided that his son was to blame for his poor eating habits.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.