Here is a Q&A where Sri Sri Ravi Shankar talks about this story mentioned in the Adhyatma Ramayana:
"...Lord Rama wanted to do be victorious in battle against Ravana, and
for that He wanted to establish a Shivalinga and worship it. Now to do
this, a priest was needed, but in those days there were no priests
found in Rameshwaram. So Lord Rama was in dire need of a good priest
to perform the rituals.
Ravana was a staunch devotee of Lord Shiva and was also a Brahmin by
birth. So Ravana’s brother Vibhishana (who was on Lord Rama’s side),
told Lord Rama that Ravana was very well-versed in the rituals. So
Lord Rama sent an invitation to Ravana to come and preside as the
priest for the pooja at Rameshwaram.
Ravana accepted the invitation and came. But then he told Lord Rama
that the pooja would be incomplete without his wife being present. No
pooja or yagna can be performed without the wife’s presence. So he
told Lord Rama, ‘Since you are a married man, both you and your wife
have to sit together for the pooja, otherwise you cannot perform the
pooja’.
Then Lord Rama said to him, ‘It is the duty of the priest to provide
an alternative for anything that is missing. Since my wife is not with
me (having been kept in captivity by Ravana at that time), please tell
me what the alternative for this problem is. Can we keep a doll in her
place as a substitute?’
Then Ravana said, ‘I do not believe in alternative. I would want
everything to be present for the worship of Lord Shiva. So I will call
your wife here for the pooja. After the pooja, please send her back to
Lanka’.
So Ravana brings Sita for the pooja. After the pooja, when Lord Rama
and Sita bow down to touch the feet of the priest, that is, Ravana, to
take blessings, then Ravana blesses Lord Rama by saying ‘Vijayi
bhavaha’ (May victory be yours!). He had no choice but to do so.
When someone touches the feet of a priest, he is left with no choice
but to bless that person. So Ravana had to give that blessing to Lord
Rama for which He had organized the pooja. He also blessed Sita by
saying ‘Sumangali bhavaha’ (May you receive all that is best and
auspicious always!) Such was Ravana’s magnanimity. After blessing both
of them, Ravana took Sita back to Lanka with him.
This is a very exciting story. We always perceive Ravana as a villain,
but even Ravana had many good qualities in him. This is why when
Ravana was counting his last breaths and was at his death bed on the
battlefield, Lord Rama told Lakshmana to go and touch the feet of
Ravana and receive knowledge from him as he lay dying on the
battlefield. Lord Rama said, ‘If I go to him (Ravana) then he will
leave his body and his soul will merge into Me. So before that
happens, go and learn all that you can from him’.
Do you know, there is a Gita by the name Ravana? It is called Ravana
Gita.
Of the five Gitas that are present, it is one of them. Just like you
have the Srimad Bhagavad Gita, Ashtavakra Gita, Udhhava Gita, and Guru
Gita; there is another Gita called Ravana Gita (the song of Ravana).
In it, Ravana teaches many sermons to Lakshmana..."