Mahesh Patrick, 14, and Shaun Emitja, 21, were found separately near Alice Springs on Friday and Saturday.
Both were dehydrated and suffering from exhaustion but were otherwise fine, police said.
Their vehicle had become bogged last Monday while on a four-hour drive through a remote area.
Unable to pull the car out, they stayed with the vehicle overnight before leaving the next morning to search for water.
They walked 5km (3.1 miles) to a hill before realising they were going the wrong way, authorities said.
"They thought they were going in a direction that would [take] them adjacent to the Sandover Highway," said Northern Territory police, referencing the single main road that travels north-south through the region.
They were reported missing after failing to return that day to Hermannsburg, an Aboriginal community 120km (75 miles) south-west of Alice Springs.
"We believe that the last time they had water could have been on the Tuesday," Acting Commander Kirsten Engels said.
Police said they then split up for unspecified reasons.
Mahesh walked about 35km on his own, at one point finding a fence which he followed south for two days. He was found on Friday night.
"Miraculously, he was located by community members who reunited him with his community and family," said Acting Cdr Engels.
He then helped a police air search for Mr Emitja, who was found on Saturday night.
"They are extremely lucky to be alive - we all know how harsh it is out there," said Acting Cdr Engels.
Authorities advise people to stay with their cars if they become stranded in the outback - as it offers some shelter and protection from the elements and is a larger target for search helicopters to find.
People travelling in Australia's remote outback should also carry food and four litres of water per person per day, authorities say.