What was the prayer of ayub as and what was his story of hardship that mentioned in Quran? Can we read same prayer?
In the Name of Allah, the Most Gracious, the Most Merciful.
As-salāmu ‘alaykum wa-rahmatullāhi wa-barakātuh.
1. Ayub (Alayhi Salam) was the prophet of Allah during the era between Musa and Yaqub (Alayhimus Salam) which was between 1300-1500 B.C.  Some scholars are of the opinion that he was originally Roman from the bloodline of Ibrahim (Alayhi Salam) whilst others say he was an Arab. It is also mentioned that his mother was the daughter of Lut (Alayhi Salam). Allah Taala blessed him with abundant wealth land, livestock, slaves and many children etc.
Allah tested Ayub (Alayhi Salam) by taking away everything he had to such an extent that even his health was taken away from him. Historians and commentators write that not a single limb of Ayub (Alayhi Salam) was safe from disease except his tongue and his heart through which he would remember Allah Taala.
Difficulties worsened to such an extent that people cut their ties with him due to his illness and had him expelled from the city to a place outside the city. The only person that was there to support him was his wife, Rahmah bint Ifrahim.
Despite all the difficulties, Ayub (Alayhi Salam) was patient, persevering, and grateful. He was also constantly engrossed in the remembrance of Allah Taala day and night. It was after years of forbearance and difficulty that Ayub (Alayhi Salams) wife told him “oh Ayub why don’t you ask Allah to help you”. He replied “I lived for seventy years in prosperity why shouldn’t I be patient for the sake of Allah for seventy years.” It was after this that Ayub (Alayhi Salam) made the following dua which is in the Quraan: 
وَأَيُّوبَ إِذْ نَادَى رَبَّهُ أَنِّي مَسَّنِيَ الضُّرُّ وَأَنْتَ أَرْحَمُ الرَّاحِمِينَ
And when Ayub (Alayhi Salam) prayed to his Rabb saying, “Difficulty has certainly afflicted me and You are the Most Merciful of those who show mercy”. (Surah Ambiya-83)
Allah Taala mentions in the Quraan how Ayub (Alayhi Salam) was healed:
ارْكُضْ بِرِجْلِكَ هَذَا مُغْتَسَلٌ بَارِدٌ وَشَرَابٌ
(Allah Taala said) Strike your foot on the ground (Allah Taala caused a spring to gush out) This is cool water for bathing and drinking (after which you will be cured) (Surah Saad-42)
Allah Taala then mentions:
وَوَهَبْنَا لَهُ أَهْلَهُ وَمِثْلَهُمْ مَعَهُمْ رَحْمَةً مِنَّا وَذِكْرَى لِأُولِي الْأَلْبَابِ
(After curing him)We gifted him with his family and as many of them in addition (twice as many) As a mercy from Us and a reminder for the people of intelligence (to remind them that Allah rewards the patient ones and restores their losses.(Surah Saad-43)
Lessons from the story of Ayub (Alayhi Salam):
a. Allah tests those that are close to him to elevate their ranks.
b. It is easy to thank Allah Taala in the state of prosperity, but praising and remembering Allah during difficulties and accepting his decree is most beloved to Allah and draws his mercy.
c. No matter the situation, one should never be despondent of the mercy of Allah.
d. Being thankful and humble during prosperity and being steadfast and patient during difficulty are two great bounties a person can have and inculcate.
2. It is advisable to recite the dua of Ayub (Alayhi Salam) when faced with difficulties.
And Allah Ta’āla Knows Best
Checked and Approved by,
Mufti Ebrahim Desai.
قصص القران مولانا حفظ الرحمان سهاروى ص557 دار الاشاعت 
 عن أبي عبيدة بن حذيفة، عن عمته، قالت: أصاب رسول الله صلى الله عليه وسلم، حمى شديدة فأمر بسقاء فعلق بشجرة ثم اضطجع تحته فجعل يقطر على فؤاده قال: «إن أشد الناس بلاء الأنبياء، ثم الأمثل فالأمثل (النسئي-7440(
عن عائشة رضي الله عنها، قالت: «ما رأيت أحدا أشد عليه الوجع من رسول الله صلى الله عليه وسلم»(بخارى-5646(
إِنَّا وَجَدْنَاهُ صَابِرًا نِعْمَ الْعَبْدُ إِنَّهُ أَوَّابٌ(سورة ص-44)
البداية و النهاية ص262 دار ابن كثير
 قصص القران مولانا حفظ الرحمان سهاروى ص566 دار الاشاعت