It is legal if he was 18 at the time they first had sex; 18 is the age of full consent in your state. If he was 16 or 17 at the time they began having sex--which includes any intimate act, not merely full intercourse--then because she was more than 4 years older than him, it would be a criminal act (commonly called statutory rape). (There is an exception that allows 16- or 17-year olds to have sex with others close to them in age, even though the 16- or 17-year old is still below the age of consent.)