When Dasharatha was dying due to exile of Rama, what was the curse given by Dashratha to Kaikeyi and which was taken back when Rama urged after finishing the war with Ravana?
It is not a curse put forth by King Dasaratha, but a conditional prohibition on Bharata.
After Sri Rama leaves Ayodhya, King Dasaratha says to Kaikeyi, renouncing his marital ties with her, as follows:
भरतः चेत् प्रतीतः स्यात् राज्यम् प्राप्य इदम् अव्ययम् | यन् मे स दद्यात् पित्र् अर्थम् मा मा तत् दत्तम् आगमत् || २-४२-९
"If Bharata feels cheerful for having got this kingdom which is imperishable, let the obsequial rites performed to me after my death do not reach me"
We have to remember that King Dasaratha put forth a conditional prohibition - If Bharata feels cheerful for having got this kingdom which is imperishable, let the obsequial rites performed to me after my death do not reach me.
So if Bharata does not show avarice towards kingdom, the prohibition does not work. As it is evident from the subsequent story that Bharata himself offered the kingdom back to Sri Rama, the conditional prohibition did not work.
After the war with Ravana was over, Lord Shiva informs Sri Rama that his father, Dasaratha, in an ethereal form and as a replica of his extinct personality, has arrived in an aerial car along with Indra, the lord of celestials. Shiva asks Sri Rama and Lakshmana to pay their respects to the soul of Dasaratha and they respond in approaching him and offer their salutations.
To Dasaratha, Sri Rama says as follows:
इति ब्रुवाणं राजानं रामः प्राञ्जलिरब्रवीत् | कुरु प्रसादं धर्मज्ञ कैकेय्या भरतस्य च || ६-११९-२५
To Dasaratha, who was thus speaking, Rama with joined palms in salutation, submitted (as follows): "Be gracious to Kaikeyi and Bharata, O the knower of virtues!"
सपुत्रां त्वां त्यजामीति यदुक्ता कैकयी त्वया | स शापः कैकयीं घोरः सपुत्रां न स्पृशेत्प्रभो || ६-११९-२६
You will remember those words spoken by you saying, I disown you, with your son (Bharata)'. May that terrific curse not touch Kaikeyi and her son, O Lord!"
तथेति महाराजो राममुक्त्वा कृताञ्जलिम् | लक्ष्मणं च परिष्वज्य पुनर्वाक्यमुवाच ह || ६-११९-२७
Saying 'May it be" to Rama who stood with joined palms embraced Lakshmana. Dasaratha again uttered the following words to Lakshmana: