Lower Class Grade/ High AP Score??

Would having a high AP score help offset a lower grade in a class? For example, if someone got a B in Bio but a 4 on the test, or an A- in AP US but a 5 on the test, would that help prove that the class is very hard, explaining the lower grades but the level of preparation attained for the AP test? Sorry if this isn’t completely coherent, thanks so much!

Maybe it’s just me, but those grades and scores seem to correlate quite well…

Getting a 4 on an AP test is like getting a B in a college course and a 5 is like getting an A so those aren’t low class grades for those AP score.