Interestingly, this appears to have been an error on the part of the actor (or director) that made it into the final cut. In the show's novelisation, based on the original screenplays, the line is corrected back to "ship" because obviously Sulu would have no way of knowing who was beaming down from where.
The air was shimmering. A familiar shimmer, but erratic and uncertain.
“Someone’s beaming down from the ship.”
Someone was certainly trying to, but there appeared to be some
Willing the transporter to operate, as if that would do any good, Kirk
waited. The shimmer faded, erupted, faded; with one last splash of
sparkles, Spock materialized in front of them.
Star Trek 12: James Blish
As to how such an error could have passed off without notice, it's worth looking at what happened on the day. Due to overruns, they had to rush through outdoor scenes in order to still have enough light for the 'samurai fight scene'. They failed, and ended up having to run for an extra four hours in the dark, at considerable cost to the studio.
So much time was put into the fight, in fact, that there was precious
little time to shoot the other scene that had to be completed this
final day on location - Sulu's encounter with the Samurai Warrior.
George Takei said, "I remember us losing the sun. That scene where the
Samurai soldier leaps out - that was supposed to be daylight. The
beginning part we shot in daylight, and we had to match it. We were
shooting that at nine o'clock at night. They brought in all of the
lights they could to try and simulate daylight. It was really tense."
These are the voyages: The filming of Shore Leave