It depends on your UMS marks, not on the letter grades themselves.
An A Level is assembled from unit scores converted into Uniform Mark Scale points. The AS contributes half and the A2 the other half, and the two are added together to give a total out of the qualification's maximum.
That combined figure is then compared against the grade boundaries published by your exam board for that specific subject and series. Boundaries shift between years and between subjects, so the same total can produce different letters in different contexts.
Find your UMS marks on your results slip or your board's results portal, add them, and check the boundary document for your subject. A B at AS and an A at A2 will usually land around a B overall, but only the actual marks settle it.