The legal battles mark a dual challenge by the Trump administration against recent federal court rulings.