It first appeared in The Art of Star Wars in a forged version of the script which was included in that book, which was published in November of 1979. The earliest pinpoint we can give is that "Episode IV" was put in place as early as November of 1978, when the fourth draft of ESB was written; the second draft was Chapter II but then Lucas merged Father Skywalker and Darth Vader and created the prequel trilogy, reflected in the next drafts where the episode listing was bumped ahead by three films and the nine-episode plan established.