Valmiki Ramayana Sundara Kanda Sarga 51 Shloka 30
Original Shlokaजनस्थानवधं बुद्ध्वा बुद्ध्वा वालिवधं तथा।।5.51.30।। रामसुग्रीवसख्यं च बुध्यस्व हितमात्मनः।
1 source checked for this shloka
जनस्थानवधम् killing of all ogres at Janasthana, बुद्ध्वा after realising, तथा that way, वालिवधम् killing of Vali, बुद्ध्वा after realising, रामसुग्रीवसख्यं च alliance of Rama and Sugriva also, आत्मनः your own, हितम् benefit, बुध्यस्व know (Judge and adopt suitable course of action.)
"You know about the killing of all ogres at Janasthana and of Vali also. You know about the alliance of Rama and Sugriva. You may decide on a proper course of action for the sake of your own welfare.