Praise be to Allaah.
Salaat al-Haajah is not prescribed in shareeah(Ibn Uthaymeen, Fataawaa Noor alal-Darb, 1/169). Imaam al-Tirmidhi (may Allaah have mercy on him) narrated a hadeeth about Salaat al-Haajah in his Sunan, but he pointed out that it is daeef (weak). He said in the chapter on what was reported concerning Salaat al-Haajah: Ali ibn Eesaa ibn Yazeed al-Baghdaadi told us, Abd-Allaah ibn Bakr al-Sahmi told us, and Abd-Allaah ibn Muneer told us, from Abd-Allaah ibn Bakr from Faaid ibn Abd al-Rahmaan from Abd-Allaah ibn Abi Awfaa who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: Whoever has any need of something from Allaah or from any of the sons of Aadam, let him do wudoo and do it well, and pray two rakahs, then let him praise Allaah and send blessings on the Prophet (peace and blessings of Allaah be upon him), then let him say: La ilaaha ill-Allaah il-Haleem il-Kareem. Subhaan-Allaahi Rabb il-arsh il-azeem. Al-hamdu Lillaahi Rabb il-Aalameen. Asaluka moojibaat rahmatika wa azaaim maghfiratika, wal-ghaneemata min kulli birrin wal-salaamata min kulli ithmin. Laa tada li dhanban illaa ghafartahu wa la hamman illaa farrajtahu wa la haajatan hiya laka ridan illa qadaytahaa, yaa arham al-raahimeen (There is no god but Allaah, the Patient, the Most Generous. Glory be to Allaah, the Lord of the Mighty Throne. Praise be to Allaah, the Lord of the Worlds, I ask You for Your mercy and forgiveness, for help to do all good deeds and for protection from all sins. Do not leave for me any sin but You forgive it, any worry but You relieve it, or any need with which You are pleased but You meet it, O Most Merciful of those who show mercy).
Abu Eesaa (i.e., al-Tirmidhi) said: This is a ghareeb hadeeth. The fact that Faaid ibn Abd al-Rahmaan is among the narrators makes the hadeeth very weak. Faaid is Abul-Warqaa.
Al-Albaani said: It is very weak indeed. Al-Haakim said: Fabricated ahaadeeth were narrated from Ibn Abi Awfaa. (Mishkaat al-Masaabeeh, 1/417). This hadeeth was also narrated by Ibn Maajah, may Allaah have mercy on him, in his Sunan, 1/144, also via Faaid ibn Abd al-Rahmaan. Al-Albaani said, in Daeef Sunan Ibn Maajah, no. 293: (It is) very weak.
On the basis of the above, this prayer is not prescribed in Islam, but if the Muslim is faced with distress, he should pray and make duaa in general (with no restrictions as to a certain number of rakahs or a specific duaa that is not proven in sound ahaadeeth, etc.), because Allaah says (interpretation of the meaning): And seek help in patience and prayer [al-Baqarah 2:45], and because of the hadeeth of Hudhayfah in which he said: When anything distressed the Prophet (peace and blessings of Allaah be upon him), he would pray.(Reported by Abu Dawood in his Sunan, 1124, and classed as hasan in Saheeh al-Jaami, 4703).
And Allaah knows best.