Valmiki Ramayana Sundara Kanda Sarga 27 Shloka 42
Original Shlokaयस्यामेवंविधः स्वप्नो दुःखितायां प्रदृश्यते।।5.27.42।। सा दुःखैर्विविधैर्मुक्ता प्रियं प्राप्नोत्यनुत्तमम्।
1 source checked for this shloka
यस्याम् when any woman, दुःखितायाम् when she is sorrowful, एवंविधः this kind of, स्वप्नः dream, प्रदृश्यते is seen, सा she, विविधैः with all kinds of, दुःखैः sorrows, मुक्ता she is relieved, अनुत्तमम् supreme, प्रियम् joy, प्राप्नोति will attain.
"When any demoness in a sorrowful state dreams this kind of dream, she will be relieved of sorrow and will obtain supreme joy.