The government will spend up to $80 million to ensure collapsed airline Rex can keep its regional flights open.