All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, is His slave and Messenger.
The Prophet, sallallaahu ‘alayhi wa sallam, said: "When you leave your house, perform two Rak‘ahs and this will safeguard you against evils. When you return home, perform another two Rak‘ahs and this will safeguard you against evils." [Al-Bazzaar and Al-Bayhaqi; Al-Albaani: Hasan in Saheeh Al-Jaami‘]
Hence, as the Hadeeth is authentic, you can benefit from it unless it coincides with the forbidden time of prayers. You may perform these two Rak‘ahs before going to work or when returning home. It is worth mentioning that performing voluntary prayers in one's home has special virtues as this was the Sunnah of the Prophet, sallallaahu ‘alayhi wa sallam. Ibn Al-Qayyim said in Zaad Al-Ma‘aad, "The Prophet, sallallaahu ‘alayhi wa sallam, used to perform voluntary prayers in his home unless there was a reason (not to)."
The Prophet, sallallaahu ‘alayhi wa sallam, said:
• "The prayer a man offers in his home is more excellent than his prayer in this mosque of mine except the obligatory prayer." [Abu Daawood; Al-Albaani: Saheeh]
The Prophet, sallallaahu ‘alayhi wa sallam, also said:
• "When any one of you observes prayer in the mosque, he should reserve a part of it for his home, for Allaah Would Make the prayer as a means of betterment in his home." [Muslim]
• "O people, pray in your homes (i.e. the voluntary prayers) for the best of a man's prayers are those prayed in his home, with the exception of what is obligatory." [Al-Bukhari and Muslim]
• "The preference of praying the voluntary prayers at home instead of praying them in the mosque is the same as that of praying the obligatory prayers in congregation instead of praying them individually." [Ibn Abu Shaybah] [Al-Albaani: Saheeh]