By symmetry, you know the centre of mass of that system is going to be on the AB line.
You know the 3 centres of mass for the individual parts and where they are. There is a 1m mass at A (5cm from O), there is a 5m mass at the centre of AB, O, and there is a 3m mass at B (5cm from O).
You've now got a 1 dimensional problem. The total mass is 9m, and you want to find where it is along AB. Imagine AB was a rod and you wanted to find the centre of mass. Can you see how to do it now?