FWIW, motors don't usually fail; it's usually the controller or battery.
DD hubmotors typically last "forever" unless overheated from use beyond their capabilities, or physically broken at the axle, etc.
If it wasn't physically broken, what was done to determine the motor was the failed part? (just so we can help you make sure you get everything fixed and don't waste money or time on things you don't need, but that you do buy all the parts you do need).
That said, there are quite a few posts about matching QS motors' phase and hall connectors to various controllers, that have info on which wire is which in those connectors. The QSmotors big for sale thread in the items for sale new section probably has this info too.
You'll have to check with Stealthbikes in australia for the controller wiring informaiton, and how to tell it to "learn" the new motor, and/or how to program the new motor info into it, and/or find out if you will have to manually determine the phase/hall wiring combo (there are many posts about doing that, if you have to).
Then make sure your new torque arms or plates that you got with the new motor will fit your frame, and are securely attached to it, and/or the old torque arms or plates that you had with your old motor are intact, undamaged, and will fit your new motor's axle.