The mass of sugar in container A was 1/4 the mass of sugar in container B. After 2.25 kg of the sugar in container A and 14 kg 400 g of sugar in container B was used, the mass of sugar in container A was 1/2 the mass of sugar in container B. What was the total mass of sugar in container A and B at first?