“When the cousins first met they were shy but soon they were getting on like a house on fire.”
To get on like a house on fire is to like each other a lot and become good friends quickly. This is one of the few times when “a house on fire” is not a bad thing!
「従妹が初めて会ったときは少しシャイでしたがすぐに大親友になりました。」
「燃えている家」みたいに仲良くなるのは、すぐにとても仲良くなることです。珍しく、「燃えている家」が悪いことではない例です!