Rackham won the war through a stroke of insight that only Ender his pupil is ever able to replicate: in the midst of a swarming battle, he identified which ship held the Bugger queen. He pierced the Buggers' deceptive tactics, in which they always shifted where the queen was in any given space battle, and identified the fluid center that always remained in any Bugger war fleet.
When he blew that ship up, all Buggers everywhere went passive, almost blank and empty, and the humans could kill them at will. This happened instantaneously.
Rackham won the war by a fluke. He happened to knock out the "mother ship" so to speak which turned all the worker buggers into brain dead useless soldiers. Once the central hub is attacked, the bugger soldiers stop receiving instructions and do nothing to fight back. Think of it as if someone cut off your brain signals to your arm. Your arm would still exist, but it could not move because it isn't receiving the neurological signals. Likewise with the buggers. There is no way Rackham had actually known about this since the humans were not familiar with the buggers' anatomy at all.