Sorry for your loss
Generally speaking, it wouldn't be something you did or didn't do. The only real exception being if the foods you feed are too old or contaminated somehow, which is usually rare. Your fish in the display tank would have also been affected had that been the case. Most likely the fish had it from the getgo it just didn't show any real signs until it was too late. Imagine the fate of your other fish had these two not been in a QT
As far as new aquisitions, I would tear down the QT
, bleach it and set up again. Cycle it for a few weeks and you should be set. Be wary about what fish shoppe you purchased these ones from, it could very well happen again.