Two years ago, a man's age was three times the square of his son's age. In three years time, his age will be four times his son's age. Find their present ages.