In the end of the holy war when Ravana was just going to die, Lord Rama asked his brother Lakshman to go and gain knowledge from Ravana? Why did he do so and what exactly was the knowledge lord rama was talking about?
The story you are referring to is not present in the authentic version of Ramayana i.e., Valmiki Ramayana. Lakshmana did not have any conversation with Ravana on the deathbed. The episode of Lord Rama killing Ravana is explained by sage Valmiki in the Yudddha Kanda of Valmiki Ramayana as follows.
That arrow, released with great speed and which was capable of destroying the body, tore off the heart of that evil-minded Ravana. Smeared with blood on having killed Ravana and thereby accomplishing its mission, that arrow re-entered its own quiver (of Rama) silently. From the hands of the slain Ravana, who was being separated from his life, fell his bow with its arrows (fitted to it), at the same time coinciding indeed with his life-breath.
The teachings of Ravana to Lakshmana you are asking might be present in other Ramayanas by other poets written later.
IMO, the teachings which are being circulated on the internet, are made up stories. Because many of those were not followed by Ravana when he was alive.