The correct answer is Option B.
We are to complete the given sentence by choosing the suitable word that describes the manner i.e. how Olivia and Ted are related.
Options A, C and D are adjectives which can be used as adverbs in some cases depending upon the sentence.
Also adverb of manner usually ends in -ly.
In the given sentence, however, 'NEAR' , 'CLOSE' and 'HARD' do not qualify as adverbs of manner to describe Olivia and Ted's relation.
Option B-'NEARLY' aptly describes 'how' Ted and Olivia are related and works as an adverb of manner. Thus it the suitable and correct answer.