Question: how is professor x alive in logan?
Answer: Professor X is alive due to what happens in Days of Future Past - Wolverine goes back in time and alters the future, so that Scott Summers, Jean Grey, and Professor X are alive in the end of the movie which set a whole new path.