Praise be to Allah.
The distance between at-Taa’if and Raabigh is 320 km, which is a distance at which shortening the prayers becomes permissible. Therefore it is permissible for you, when travelling between the two cities, to follow the rulings on travel, i.e., shortening prayers and putting them together, and not fasting, because you are a traveller.
It says in Fataawa al-Lajnah ad-Daa’imah (vol. 1, 9/88): The distance at which the concessions of travel come into effect is that which is customarily regarded as being travel; that distance is approximately 80 km. So if a person travels this distance or more, then he may avail himself of the concessions of travel such as wiping over his khuffayn for three days and nights, shortening the prayers and putting them together, and not fasting during Ramadan. End quote.
For more information, please see the answer to question no. 105844
If a person is residing indefinitely in a city for the purpose of work, and he does not intend to move back to his original hometown, then he comes under the rulings of those who are resident in that city. Therefore he must fast, offer the prayers in full, and follow all the other rulings that apply to residents.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
If they intend to stay indefinitely in the foreign land, such as workers who live there for the purpose of work, or businessman who stay there for the purpose of business, or state ambassadors and the like, who have decided to stay there, unless some reason arises which dictates that they should return to their homelands, they come under the same rulings as local residents with regard to it being obligatory for them to fast, offer the four-rak‘ah prayers in full, and wipe over the khuffaayn for no more than one day and night.
End quote from Majmoo‘ Fataawa Ibn ‘Uthaymeen (15/289).
If after that, he travels to his original hometown from which he departed, or to a city where he has family, and he does not intend to stay in that city for more than four days, then he is a traveller, and he may avail himself of the concessions of travel, namely shortening the prayers, not fasting in Ramadan, and other rulings pertaining to travel.
Imam ash-Shaafa‘i (may Allah have mercy on him) said: If he comes to a city and he has any relatives, in-laws or a wife there, but he does not intend to stay any longer than four days, he may shorten his prayers if he wishes. The Companions of the Messenger of Allah (blessings and peace of Allah be upon him) shortened their prayers with him in the year of the conquest (of Makkah), and during his Hajj, and during the Hajj of Abu Bakr. Many of them had one or more houses in Makkah, and relatives, including Abu Bakr, who had a house and relatives in Makkah. ‘Umar also had many houses in Makkah. ‘Uthmaan had a house and relatives in Makkah. But I do not know that the Messenger of Allah (blessings and peace of Allah be upon him) instructed any of them to offer the prayers in full. He did not offer the prayers in full and they did not offer the prayers in full after the Messenger of Allah (blessings and peace of Allah be upon him) when they came to Makkah.
End quote from al-Umm (1/217)
Shaykh Ibn ‘Uthaymeen was asked: I live in al-Qaseem, and sometimes I go to Riyadh to visit my family, and I have a room there, and I stay with them for two or three days. Do I have the right to shorten my prayers if I pray on my own? Do I come under the same ruling as a traveller?
He (may Allah have mercy on him) replied:
Yes, you come under the same ruling as a traveller, because your place of residence is al-Qaseem, and your visits to your family are the visits of a traveller. Hence the Prophet (blessings and peace of Allah be upon him) shortened his prayers in Makkah, although he had previously been one of its residents, and he had houses there. But when he migrated, Madinah became his place of residence. So if you go to visit your family, then you are a traveller.
End quote from Liqa’ al-Baab al-Maftooh (58/23)
To sum up: it is permissible for you to avail yourself of the rulings on travel in two cases:
1.Whilst you are travelling between the two cities, there and back, because the distance between them is the distance at which shortening the prayers becomes permissible;
2.whilst you are staying in at-Taa’if, if you have decided to settle in your place of work, if you are staying in at-Taa’if for four days or less, according to the opinion of the majority of scholars. But if you are in a place where the prayer is offered in congregation, then you must pray with them, and if the imam is a resident who is offering the prayer in full, then you must offer the prayer in full behind him.
For more information, please see the answer to question no. 45815
And Allah knows best.