Already frustrated with the homeland security secretary, Trump was incensed with her performance in congressional hearings this week and it cost her the job, sources told NBC News.