The correct option is
B paint
In order to fill in the blank with the most suitable form of the infinitive, we need to understand the meaning and usage of 'would rather'. 'Would rather' means preferring something or someone over the other. If 'would rather' is used in a passive (voice) sentence, we use the word 'to' along with the verb. In an active sentence, we do not use 'to' with the verb. The verbs without the marker 'to', are called bare infinitives.As the given sentence is in the active voice, we will use the bare infinitive here.
Option A - 'Do paint' is an inappropriate conjugation of the verb. As 'do' and 'paint' both are verbs, we can only use this combination when we want to tell someone to do something for sure. As we need a bare infinitive here, we can't use 'do paint'. Hence, option A is incorrect.
Option C - 'Painting' is the participle form of the verb 'paint'. As we need the verb in its original form, we can't use the participle form here. Hence, option C is incorrect.
Option D - 'To paint' can't be used here as the verb in its original form with the marker 'to'. As the sentence is in the active voice, we can't use the infinitive with 'to' here. Hence, option D is incorrect.
Option B - 'Paint' is a verb in its original form and is a bare infinitive. Hence, option B is the correct answer.
'Shashank would rather paint than draw or sketch.'