Let me add yet another dimension to this tangle. Normally the expression ‘if only” is used to express a subjunctive desire or wish as in --- If only I were Bill Gates, I would donate half my earnings to charity, --- or --If only we had the means to control the rain gods, we would not suffer drought etc, etc; Mostly these are hypothetical fancying and unachievable in the normal course.
But in the context, four of the choices carry this phrase, which IMO is weird; unfortunately, the only other choice 3 is still more muddied because of the improper placement of the restrictive adverbial modifier ‘only’. For choice 3 to mean something worthwhile, we need to drop the word ‘only’ outright.
Among the rest of the four choices, 1 and 5 can be easily dropped on subject- pronoun number disagreement alone. Between 2 and 4, the construction is convoluted in choice 4, leaving only 2 as the best of the available choices. So one may see why we are forced to take B as somewhat correct.