The correct option is D If only Joey had been hungry,
The correct sentence is ‘If only Joey had been hungry, he would have finished his lunch’. This sentence expresses a regret for the past as it has the conjunction ‘if only’, followed by the subject ‘Joey’, followed by the helping verb ‘had’ and the past participle of the verb ‘be’, ‘been’.