Then Prussia would have been heavily defeated by the combined weight of both nations because it only became a military powerhouse after the 1866 campaign allowed it to dominate the other German states.
Historically, the war was far less one-sided than many people believe. In simple terms, the Austrians had been defeated in 1859 because they tended the fight defensively against the very aggressive French. While inflicting considerable casualties on the French, the French would eventually storm their positions or outflank them with greater battlefield mobility (the celebrated ‘Furia Francese’).
So, after the war the Austrians switched to their own ‘Furia Austrienne’ as it were and adopted an aggressive doctrine. Unfortunately, attacking requires more leadership and cohesion than the polyglot Austrian empire could easily provide.
In the initial battles of 1866, the Austrian storm columns came up against the Prussian dispersed skirmish/firing lines, designed to maximize the effect of their bolt action rifles which could provide a volume of fire no muzzle loader gun could match, even if deployed in similar firing lines.
The initial border battles led to impressive Prussian victories but by the time of Königgrätz, the Austrians had learnt their lesson and switched to a defensive tactic with their infantry while their superior artillery hammered the Prussians. Now the booth was on the other foot and the Austrians gave as good as they got, only losing to an unexpected flanking movement. At that point, Emperor Franz Josef gave in because he saw no hope, despite still having untapped resources. Had France been an ally, such a battlefield reverse as Königgrätz could be absorbed politically and morale wise.
As to the French, the Mexican adventure was a financial drain but it hardly mattered in military terms. At its height, the French deployed less than 40,000 men.
The reasons for the debacle in the Franco-Prussian war are diverse but IMO mostly rest on new doctrine established just before 1870, namely the ‘magnificent position’. Instead of their habitual aggressive tactics, the French decided to rely on the power of their new bolt action rifles. During the war of 1870, the French took up strong defensive positions, inflicted heavy casualties on the Prussians and then found themselves under attack from converging Prussian forces and were defeated in detail while friendly forces in supporting distance refused to budge from their own defensive positions. This defeat predictably would lead to the subsequent ‘attack at all costs’ mentality which proved so ruinous in the early days of WWI
In 1866, the French army was still a very strong force and while it might have had trouble against the Prussians alone, an alliance with Austria and the North German Confederation should have been capable of smashing Prussia.
So why didn’t it happen? Napoleon III was a strange mix of ability and staggering incompetence. To break the chains of 1815, he needed political instability in Europe but underestimated Prussia and Bismarck. He considered Austria a bigger enemy than Prussia and thought he could extend his influence along the Rhine if Austria was humbled by Prussia and that he would be rewarded with a province or two if he acted as an armed mediator between both states after they reached a stalemate. The early defeat of Austria (on paper, a much more formidable military power than Prussia) was totally unexpected and left France with an undesirable fait accompli.