The masses of solute in the 2 solutions can be different but result in the same concentration, this is best explained with examples.
Say solution A contained 10g of solute and had a volume of 100dm^3
If solution B contained 5g of solute and had a volume of 50dm^3 this would make the concentrations of A and B identical.