By almost pure luck the wizards/scientists of Empire A made a gigantic breakthrough that allowed them to create a weapon able to destroy the world, i.e. the one and the only planet on which Empire A and Empire B are located. They were lucky because there was only one correct path in their discovery and endless false ones and by sheer luck they managed to choose the correct one. Otherwise, exhausting even half of possible dead ends would take about a decade of intensive well-funded research.
The wizards/scientists are sure that the weapon will destroy the whole world because they know how the weapon is supposed to work (the weapon has never been activated, as it would destroy the world). The government of Empire A has no reason to distrust its wizards/scientists on that. Empire A knows that Empire B wants to completely destroy Empire A (although it's mutual, Empire A also wants to destroy Empire B), so the weapon will allow Empire A to survive even if war goes really poorly, as Empire A will threaten to activate the weapon in that event ("We don't value the existence of this world if it will exist without us").
The problem? They need to convince the Government of Empire B that they really have this doomsday weapon. Obviously Empire A can't activate the weapon to demonstrate it in action. Of course they could just give the blueprints of the weapon to wizards/scientists of Empire B, so they would confirm that the weapon really works the way Empire A claims it works. But then it would not take Empire B long to produce the same weapon, thus foiling the plan of Empire A on eradicating Empire B. Eventually Empire B will re-discover the way to make this weapon anyway, but it will take lots of time, giving Empire A hope of being able to eradicate Empire B before its research will be completed.
P.S. The weapon is too large, complex and delicate to be sent to another planet (it must be placed on the planet that it will destroy) or even built on the planet to be destroyed. Constructing it in space or sending it to space isn't feasible either. And it can't be downscaled, neither in its size nor effect.
P.P.S In case of wizards, they use mathematics to model work of magical artifacts and their mathematical models are top-notch.
P.P.P.S Both Empires are dicatorships. For this reason if the regime of Empire A falls (whether due to war or revolution), then it's a death sentence to its elites. They will literally die.