There is time for this to change if you can evidence that you are working at that level. But you may need to ask for extra work. But to be fair to the teachers if a B is what you are realistically working at, it would be awful to get an offer at AAA and miss it on results day. It happens.
Irrespective of predicted grades you would need to work hard to get the final grade up.
However, for medicine a B in a predicted grade is not the end of the world, several med schools disregard predicted grades in their scoring mechanism anyway. Plus some med schools give flex in final offers to A*AB or AAB if A in an EPQ, or AAB or even ABB if contextual. The fact it’s not bio or chem helps.
It is really important for anyone to apply strategically for medicine, when you have your UCAT score look at the which medical school should I apply to Megathread. Put your details in as per the first page (it’s all relevant). State that your predicted are AAB (in Maths) if that is what they end up, but be honest with yourself. If you think there is a risk that your final Maths might be a B, then be honest. People then might be able to help you target your application further to those with those flexibilities.
It does hinge on your UCAT though as you would need to get it high enough to have a reasonable chance at those unis. So don’t worry about the pred. grade too much now, flag it to your teachers now before the end of term so they can give you extra work if you want, but otherwise give time to your UCAT as it’s more time restricted.
Lastly, if it came down to the wire and you got an offer at somewhere which accepted A*AB you may decide that pushing for an A* in something like Bio or Chem is more achievable than pushing for an A in Maths, but that is a tricky decision for down the line- so to keep options open you must continue striving for the highest grades possible in all subjects.
Good luck.