How does an aircraft distribute fuel equally between powering the turbines on the engine and injecting it into the afterburner?
The aircraft fuel system does not  distribute fuel equally among the afterburner and the engine's core (i.e. the compressor-combustion chamber-turbine part). It distributes fuel in such a way that the combustion is maintained in both the combustion chamber and afterburner and the required thrust is produced.

Consider the case of F-15 E/I/S or F-16 C/D powered by PW F100-PW-229 (data from jet-engine.net). Here, the thrust and SFC (specific fuel consumption) for dry and wet thrust are given as 17800/29100 lb and 0.726/2.060 lb/lb/hr respectively.

Simple calculation yields fuel consumption rate of 59946 lb/hr and 12923 lb/hr with and without afterburners. This answer by @KeithS gives the fuel consumption of F-16 with and without afterburner as 64000 and 8000 lb/hr respectively. Also note that fuel consumption varies greatly with other conditions like altitude, external stores etc.

It can easily be seen that the use of afterburner increases fuel consumption by 5-8 times and most of this has to go into the afterburner. So, once the pilot punches the afterburner, the fuel system delivers much more fuel to the afterburners than to the 'core' of the engine. These decisions are made usually by the aircraft computer/engine FADEC based on pilot input in all modern combat aircraft.