A mathematics teacher has built a decoration for her classroom to celebrate ‘Pi Day’ on March 14th. The decoration is in the shape of the letter π, made of two identical poles and a non-uniform wooden beam AB of mass 1.4 kg and length 4 m. She attaches two identical baskets to the beam, one at point A hanging by a light inextensible string and the other fixed to the beam at point B. The two poles are vertical and are placed 2 m apart, and the beam rests horizontally on top of them as shown in the diagram below.

When the beam is placed onto the poles with both baskets empty, and such that the midpoint of the beam is halfway between the two poles, then the beam is at the point of tilting about the pole closest to A. With the beam in the same position a mass of 3.2 kg is placed into the basket at B, and the beam is then at the point of tilting about the pole closest to B.
Use the above information to find the distance of the centre of mass of the beam from B, as well as the empty mass of each basket. In your solution you may treat the basket at B, along with anything it contains, as being a point mass located at B.