All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
First of all, we thank you, dear sister, for being keen on knowing what is lawful to do and what is unlawful. This is indeed how a Muslim who is keen on obeying his Lord and staying away from disobeying Him should be.
If the situation is as you mentioned, that the name “Ram” and the name “Lakshman” are names for what the Hindu polytheists worship, then it is not permissible to sing this poem.
How could it be permissible for a Muslim to sing the names of deities that are worshiped instead of Allah? If someone sung the names of Al-Laat and Al-'Uzza, and Manaat (idols of pre-Islamic polytheists in Arabia), he would be a sinner, and it is feared that he becomes a disbeliever by doing this. The same applies to singing the names of those idols. The fact that singing that poem leads to getting marks does not justify singing it; what is the use or the benefit of getting marks in this world if this leads to falling into Hellfire? We seek refuge in Allah from that. If you get those marks, they are inevitably going to perish, and it is only that which is with Allah that remains.
Allah says (what means): {Whatever you have will end, but what Allah has is lasting. And We will surely give those who were patient their reward according to the best of what they used to do.} [Quran 16:96]
At-Tahreer wat-Tanweer reads: “{What Allah has}; i.e. the good that He has reserved for the Muslims in this worldly life and the Hereafter is better than what the polytheists give to them; what is with Allah is everlasting, so it is better to rely on the provision that Allah has promised and not rely on the provision of people, as their provision ends even if it is abundant…” [Abridged]
We also draw your attention, dear sister, to the fact that it is not permissible for a woman (or girl) to sing when she can be heard by non-Mahram (marriageable) men, so if your school is mixed (for boys and girls) – as is the case in many schools in non-Muslim countries – then it is not permissible for you to participate in singing even if the words of the song are permissible if men can hear you.
Allah knows best.