Dear Student,
Phenolpthalein is an acid-base indicator . It remains colourless in acidic solutions while turns pink in basic solution.
Solution which turns phenolpthalein solution as pink will be basic in nature while the solution B is of acidic nature .
Solution B when added will neutralize the base and will become colourless when the solution becomes acidic.
Regards!