Correct option is B
The part that contains a grammatical error is (B).
The error is in the use of the indefinite article 'an' before the word 'whole'.
Explanation of the Error
The choice between the indefinite articles 'a' and 'an' is determined by the sound of the word immediately following the article.
Use 'a' before a word that begins with a consonant sound.
Use 'an' before a word that begins with a vowel sound.
The word 'whole' begins with the consonant sound /h/ (like the 'h' in house). Therefore, the correct article is 'a'.
Corrected Sentence:
It took a whole hour to finally convince her to sign the document.