Another answer is to look at the statements that were made during the endorsement.
Carson and Trump both indicated that Carson would provide advice on education policy. This is not a quid pro quo, it is Trump agreeing that Carson could help him with the education platform for his contest.
Later? Sec of Education? Well, that could be because he helped write the position.
This keeps everything above board. Done this way it is not a problem
Yeah, I don’t assume Trump didn’t do anything illegal here but if he did...