Ram Raksha Stotra (श्रीरामरक्षास्तोत्रम्) is a Sanskrit stotra, hymn of praise, used as a prayer for protection to Lord Rama. This stotra is Written by Budha Kaushika Rishi.
As I discuss in this Question, there is not a lot of information about Budha Kaushika Rishi like his date of birth and when he created Ram Raksha Stotra
Also, there is a Shiva Raksha stotra, It is a Sanskrit stotra, hymn of praise, used as a prayer for protection to Lord Shiva. This stotra is Written by Yagnavalkya Rishi.
If one reads these 2 stotra, both are almost identical to each other in terms of its format because in each of this stotra, we are asking Rama and Shiva to protect different parts of our body.
Of course, deity is different but there are other similarities too.
Let's consider below instance, from Shiva Raksha
इमां नारायणः स्वप्ने शिवरक्षां यथाऽऽदिशत् । प्रातरुत्थाय योगीन्द्रो याज्ञवल्क्यः तथाऽलिखत् ॥१२॥
Meaning:
For this protection of Lord Shiva was revealed, By Lord Vishnu in the dream to Yagna Valkya, Who wrote it, as he was told, as soon as he woke up in the morning.
And this Instance from Ram Raksha:
आदिष्टवान् यथा स्वप्ने रामरक्षामिमां हर: । तथा लिखितवान् प्रात: प्रबुद्धो बुधकौशिक: ॥१५॥
Meaning:
This protective hymn of Rama, as told by Shiva (Hara) in the dream । Was written down (as told) by the enlightened (by Shiva's visitation) Budhakoushika in the morning (upon waking up)
From Above, even the seed of origin of these 2 stotra appears so much similar.
My Question: Which out of Ram Raksha or Shiva Raksha is written first?
I guess if we can get the life duration of it's Author(like who was older between Budha Kaushika Rishi or Yagnavalkya Rishi) then we can probably say which one is composed first, but unfortunately I could not found much life info about these 2 Author Rushis.