Tolstoy set up Gerasim to be a foil to Praskovya Fedorovna in these two excerpts from The Death of Ivan Ilyich by A)Both Gerasim and Praskovya Fedorovna are honest about their motives, but only Gerasim genuinely cares for Ivan Ilyich.
Gerasim possesses the nature of empathy and compassion for any fellow. For Gerasim other person's well-being is of utmost importance. As an aid and duty towards a dying man, Ivan, Gerasim helps Ivan in excretion and comforting him at night. On the other hand, Praskovya and Lisa only aggravated Ivan's condition. Gerasim is able to bridge the gap both spiritually and mentally between world and Ivan. Gerasim's spiritual way towards life makes Ivan realize his past life mistakes and eases him towards achieving spiritual health.