Both of these characters are shown to experience significant hardship in their own ways. Ruth, for example faces the daily grind of poverty and the challenges of trying to bring up a family in desperate situations, whereas Ophelia experiences being discarded by her lover, Hamlet, and then having her former lover kill her father, which sends her into madness. What is different about these two figures is the way that Ruth shows herself to be stronger than the circumstances that she faces, whereas Ophelia is overcome by the tragedy that befalls her and dies as a result, whether it is suicide or a result of her madness is left unclear.
Ruth distinguishes herself from Ophelia because she has massive self-determination and belief in her ability to make things better, in spite of the difficulties she experiences in life. Note for example what she says to Mama when she begins to think maybe they should not move to their new house:
Lena--I'll work... I'll work twenty hours a day in all the kitchens in Chicago... I'll strap my baby on my back if I hve to and scrub all the floors in America and wash all the sheets in America if I have to--but we got to MOVE! We got to get OUT OF HERE!!!
This is a very different figure from that of Ophelia, who seems to passively accept the misfortunes that befall her rather than raging against them and recognising that she has the ability to change her situation. Ophelia's madness can be seen as a welcome escape from the unpleasant realities she faces, whereas Ruth, no matter how desperate the situation is, remains an active character who recognises she has agency. Both figures are tragic to a certain extent, but there difference lies in the way they respond to that tragedy.