Multi-billion-dollar coal deal and lithium rescue tell tale of two energy cities