The pair are on separate fact-finding missions to prepare logistics for the relocation of the government, which has been based in Kenya since its formation in October due to security concerns.
President Abd Allah Yusuf Ahmad arrived by plane from Nairobi at 12.45pm (0945 GMT) in the town of Jowhar, north of the capital, Mogadishu, shortly after Prime Minister Muhammad Ali Gadi and a delegation of senior Somali officials touched down in another aircraft.
Several thousand cheering and dancing Jowhar residents greeted the president's plane, waving Somali flags and posters of the president and prime minister as well as placards.
The Transitional Federal Government (TFG), tasked with bringing order to a country torn apart by 14 years of strife between rival clans, has remained in Kenya since its formation at peace talks last year.
The meet-the-people tour by Gadi and Yusuf had been due to leave on Wednesday, but was delayed because of transport problems.
President Ahmad (L) is on a
Several teams from Gadi's fledgling administration have made visits home from Kenya this year to assess security to prepare for their return to the lawless Horn of Africa nation.
Gadi intends to visit at least four towns in south and central Somalia on an eight-day tour for talks with elders, women's groups, businessmen and religious leaders.
Diplomats said they expect the team to assess security and to visit Mogadishu.
After Gadi's return to Kenya, the TFG will decide where it should be based and where African Union troops should be deployed.
Officials say Mogadishu may be too dangerous initially.
The TFG, Somalia's 14th attempt at an effective central administration since 1991, is trying to arrange sufficient protection to enable it to establish its authority and begin disarmament of the country's many militias.
Yusuf has asked African and Arab states to supply 7500 peacekeepers to help disarm militiamen roaming the capital.