If I’m understanding this correctly, agency B has asked agency A for a reference for you and agency A hasn’t given them one ?
As far as I’m aware employers are not legally obliged to give a reference so there’s nothing you can do about it, I could be wrong though