All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
In principle, different works and professions are permissible so long as they don`t violate Sharia since Allah, The Almighty, said, "And when the Prayer is finished, then may ye disperse through the land, and seek of the Bounty of God"{Al-Jumu`ah, 10}. However, so long as public transport laws ban using private cars for transporting paying passengers, then they must be adhered to.
In this regard, Muslim scholars have made clear that the ruler may restrict the permissible if that lies in the best interest of the people, wards off harm and doesn`t violate Sharia texts(Quran & Hadith). In conclusion, public transport laws must be abided by when operating private cars for transporting paying passengers to ensure that public interest is observed. And Allah knows best.