Fred, a mathematician, was walking leisurely down a sunny street on a Saturday afternoon when he spotted his colleague Leonard that he had run into not so long ago.

“Hello Leonard, nice to see you again.

“Likewise, Fred, I see you are well,” replied Leonard, shaking his hand.

“Last time we met we spoke about my children, Fred. Do you have any children?“ queried Leonard.

“Yes, I do, I also have three children. I married your old girlfriend Jo Anne after you left for university,” said Fred.

“Really Fred, glad you two hit it off,” replied Leonard. “I wonder how old your children are.”

“As you are a colleague, I will give you the answer in a mental package as you gave me before,” smiled Fred.

“Ok, shoot,” said Leonard.

“The sum of the square of the ages of Bill and Mary add up to the sum of twice the product of Mary’s and Leo’s ages plus thrice Leo’s age. When Bill is twice as old as he is now he will be one year younger than Mary at that time and one year older than Leo at that time,” informed Fred with a magnanimous grin.

“Hmm, Fred, a bit muddy, could you give me some more information,” said Leonard.

“The sum of their ages when Bill is twice as old as he is now will be 36,” offered Fred.

“Well, that’s better,” replied Leonard, thought a moment and offered Fred the correct ages of his children.

“Let’s head over to a fine café I know of down the street for a nice chat,” said Leonard.

*What do you say are the ages of Fred’s children?*