This is research for a book I'm writing which is set in a world with the technology level and feudal system of the late medieval period. The only exception is that there is magic and a non-human race called Meliels who are a hive-mind esque race that are usually akin to 'animals' until they are united under an intelligent 'King' Meliel.
Magic is very limited and those who can do it are heavily controlled by the Northern domain. So, essentially magic wouldn't have much impact on building/rebuilding a city, except for one thing - they can levitate objects up to five times their weight per mage. So 1 ton per every two mages. There is approximately 1 mage per every 10,000 people in the kingdom.
Context: The kingdom of Terin is split into two halves, the northern domain and the southern. They've just won a war defending against the invasion of the Meliel's from the south. The Meliel's invaded and conquered half of the southern domain in one year, it took another year of war before they were slowly pushed back into their own territory south of the domain. The half of the domain that was invaded was pillaged and burned, with all of the farm territory there being completely destroyed and all of the people forced to flee or die. There was no integration, just salt and burn and kill.
The overall population of Terin post war is about 3-4 million, and the overall size is 250,000 km2, and they are similar to medieval Britain in terms of military strength/economics and such, with the focus being on a strong navy (The kingdoms entire eastern and northern border is on the sea, hence the navy). The size of the southern domain is approximately 90,000 km2 with a total post-war population of about 1 million (pre-war it was almost double that), with only the south half of the domain having been completely conquered and destroyed during the war. About 700,000 people were forced to flee their homes, but they are slowly returning south now that the area is reconquered.
Economics/layout of the domain: Most of the domain is landlocked, but their easternmost border hits the sea, with several settlements there that export their main source of income - salt and lumber which they traded with the northern domain and the Italy-esque city-states across the narrow sea. Their eastern border was conquered, but not really destroyed, and it was the first to be retaken with help from the northern domain's navy.
The southern domain's western border has impassible mountain ranges that are largely unsettled and make trade with the western human countries nearly impossible for them. The Northern domain does have access to the western countries though and has quite a bit more cities and wealth along the western border because of this. The rest of the southern domain is farmland with the main city built nearest to the southern border blocking the stretch of land between two huge marshes on either side (which is why it was conquered and destroyed by the Meliel's).
The King of Terin order the Duke of the southern domain to rebuild and refortify the domain as soon as possible in case the Meliels regroup under a new King. For context, such a thing is rare, like once every two hundred years rare, which is why they were so surprised when they invaded...but that doesn't mean it couldn't happen again much sooner. Usually, the Meliels are like any other wild predator/animal, generally harmless until you get in the way of their food source, mates or territory...so now that their King has been killed and they've been 'defeated' they've essentially retreated back to their territory. Some, however, are still roaming the southern domain in little murderous packs which will cost money and time to find and get rid of.
The main focus however, is rebuilding the main city asap because of its location as the main point of contact with the Meliels territory. The city once held a population of 200,000 before it was conquered/destroyed by the invading army. The city was a main point of trade for the southern domain as well as being the seat of power for the Duke. It is in ruins now after being overrun by the Meliels and set on fire, so only the stone foundations and bones of the city's buildings are still intact. It needs to be rebuilt as fast as possible to home the majority of the city's returning population, all of whom are living in ramshackle 'tent cities' amongst the ruins now. Additionally, most of his people's farmland was burned during the war by the invaders and they are heavily relying on food imports from other domains in the kingdom. There's also the fact that they still have to supply and keep a standing army at the border point, as well as send off some troops to deal with the roaming packs of Meliels that have escaped into the western section of the Southern domain.
I'm really not sure about the exact amount of money coming in from there main exports, but the eastern settlements that export salt and lumber are pretty profitable, both of which they trade via ship with the northern domain and with city-states across the sea similar to the medieval era Italian city-states. The king of Terin sends some amount of money to the southern domain to rebuild and also sends about 200 trained adult mages to help with the reconstruction of the main city.
Edit: My own research into this has mostly lead to how long and how much it cost to make a castle from scratch, to which the answer was - it varied - or how they came to be gradually along with their cities over decades etc. I haven't found much on specifically rebuilding a city in total ruin, nor how exactly countries rebuilt their cities and settlements after a war that completely destroys an area. (though that could just be me being bad at research sorry)
However, I based the seat of the Duke's power to look much like Castle Conwy in Wales so most of my research was based on that. This castle was created within 4 years, from 1283 to 1287 CE, at the cost of 15,000 pounds, and took a vast team of laborers/craftsmen/masons numbering 1500. (source: https://www.ancient.eu/Conwy_Castle/) So I guess I'd assume the time it'd take to rebuild it would be less and cost less than the figures stated above, and that the time would be further expedited by the use of mages to levitate heavy stone needed for rebuilding...but I wasn't sure, which is why I posted here.
So how much money would the Duke of the domain need and how long would it take for his city/domain to be rebuilt?