Does graded fund B need to buy the same amount as graded fund A before it can be merged into the parent fund?
Yes, if your grade B approaches the threshold and falls, the best way is to buy grade A and immediately merge and redeem it.
However, there is a time difference that must be noted, because not all brokers can merge on the same day, and some can merge the next day. Don't ask me why, it's a brokerage problem.