Semiconductor-metal nanowire heterostructures have attracted a particular interest over the last decade. However, they often suffer from low interface and crystalline quality. Here, we present a model for the formation of GaAs-Au axial nanowire heterostructures from GaAs/Au core-shell nanowires encapsulated into SiO2 under flash lamp annealing, as described in the previous work. The model reveals the basic mechanism and establishes the main control parameters of the process which enable high quality GaAs-Au heterostructures. It can also be used for the optimization of similar processes in a wide range of material combinations.