If i can remember well, there was no "sale" OTL - the house just went extinct in the male line in 1246 , then Ottokar of Bohemia took over Austria and Styria, and then Rudolf of Habsburg took those from him in turn.
Ottokar II of Bohemia married a Babenberg heiress 20 years his senior and took over the duchies of Austria & Styria, later he added to this the duchy of Carinthia and the margraviate of Carniola (including a bit of Istria). He eventually repudiated her for a much younger Hungarian princess.
The reason he could do this was the Great Interregnum after the Staufer (Hohenstaufen) Imperial house went extinct and the Prince Electors had elected two king of the Romans, Richard of Cornwall (pro Welf faction) and Alfonso of Castile (former Staufer supporters). This period lasted almost 20 years and allowed Ottokar and other Imperial Princes to illegally seize those territories.
To end the anarchy the Prince Electors eventually agreed on a compromise candidate, count Rudolf of Habsburg , a prominent noble from Swabia, experienced yet relatively old.
Rudolf had many daughters, which he married to the dukes of Saxony, Lower Bavaria and Upper Bavaria and the margrave of Brandenburg, his eldest son Albrecht was married to the daughter of the count of Tirol. The Imperial diet agreed that illegally seized fiefs were to be returned and dealt with in a legal matter (note that almost every Imperial Prince had done so, including Rudolf, but none to the same degree as Ottokar), Rudolf was wise enough to devolve many of this to highest Imperial Princes, who supported him, but all of them agreed that Ottokar, king of Bohemia, should be taken down a peg.
It took 2 battles in the first Rudolf had the support of the Imperial Princes and defeated Ottokar (1276), who was then restored to his ancestral lands Bohemia and Moravia as Imperial Fiefs. Austria, Styria, Carinthia and Carniola were put under the Imperial Administration (Rudolf already had the desire to increase his dynastic lands).
In 1278 it came to a second conflict with Ottokar, this time Rudolf only had his own allies (including the king of Hungary) and some Imperial Princes now even sided with Ottokar. This was another, now personal, victory for Rudolf. This allowed him to invest his son Albrecht and Rudolf with the duchies of Austria & Styria. His ally and father in law of Albrecht, the count of Tirol was invested with the duchy of Carinthia and the margraviate of Carniola (with the provision the Habsburgs could inherit these, if his line would end without heirs).