The sum of ages of fred and pat is 40 years. in four years the age of pat will be three times the age now. how old is each boy?