You would go to the listing for name Y -- the incorrect or less common name -- and click on the 'Edit Page' button to bring up the submission form.
Choose "name correction" from the list of potential changes. Enter name X in the box, in reversed form (e.g., Doe, John); if there is more than one person with the same name, be sure to include the proper Roman numeral (e.g., "Doe, John (I)" ). If name Y was a typo, and did not appear on screen, that's all you should do; if the person has also used name Y in some credits, you should check the box underneath marked "update existing credits with 'as' attribute". Include an explanation in the box provided.
You'll see a warning that you are combining two names. Since that is what you wanted to do, you should check the box acknowledging the warning.
The rest of the process proceeds as normal.
Please note that the updates may happen in stages; some credits may disappear for a day or two while the merge is being processed.
You may also want to review our naming conventions.