A desperate rescue unfolded before dawn as firefighters pulled two residents from a burning unit west of Brisbane.