Let us write this as a chemical reaction.
A + B -----> C + D
Here A and B are the two reactants. C and D are the two products. As per the law of conservation of mass/ matter, mass / matter can neither be created nor it can be destroyed. It means the total of masses of reactants should be equal to the sum of the masses of the products.
Whatever mass you begin with , same mass you end up with.
mass of A = 1.32 g
mass of B = X g
mass of C = 0.91g
mass of D = 22.87 g
mass of A + mass of B = mass of C + mass of D
1.32 + X = 0.91 + 2.87
1.32 + X = 3.78 ( subtract 1.32 from both side to get value of X)
1.32 + X -1.32 = 3.78-1.32
X = 2.46 g
amount of B that entered the chemical reaction was 2.46 g