Did she come with Luke? Isn't the X-wing only built for one?
Presumably, she arrived in the Millenium Falcon, which is how she leaves Tatooine with the rest of the group.
From the script
44A EXT SPACE ABOVE TATOOINE
The desolate yellow planet fills the screen, Luke's X-wing appears and peels off to the left. A moment later, the FALCON appears as a dot and grows huge, to roar directly over the CAMERA.
45 INT X-WING - COCKPIT
Luke is at the controls, with Artoo attached behind him outside the canopy. Luke speaks into his comlink to the others, in the MILLENNIUM FALCON.
The deleted Sandstorm scene at roughly 2:50 into this video shows the Falcon parked somewhere on Tatooine, so we know they didn't shuttle up to the ship elsewhere.
According to original Lucas notes, they arrived on a Falcon.
Perhaps the earliest outline for Jedi, written on a single page, has the droids landing on Tatooine and looking for Luke and Leia in a spaceport, but finding no one. A sentence reads, “Angry landlord takes Falcon?” The droids find them at an inn, where Luke and Leia have to decide between the rebellion and saving Han, which creates a “time lock”—that is, a device to create suspense in the film, a due date (The Making of ROTJ, by J.W. Rinzler)
The fact that Luke and Leia arrived together kept into further drafts (but doesn't specify it was on Falcon):
RETURN OF THE JEDI, BY L. KASDAN AND G. LUCAS, NOVEMBER 1, 1981—REVISED SECOND DRAFT SUMMARY
Commander Skywalker and Princess Leia have made their way to the Tatooine system in an attempt to rescue their friend Han Solo from the clutches of the vile gangster, Jabba the Hutt.
I wasn't able to find anything useful in either original, OR new Disney Junior, novelizations.