Saying he “ghostwrote” the song doesn’t seem accurate. He changed some chords on his solo. If he actually wrote Beat It he definitely would have claimed credit for it, since that songwriting credit alone that would have made him an incredible amount of money.