Create a javascript which takes the above two values as arguments. Inside the function, use:
Code:
// here 'txtarea' inside brackets is the ID set for the textarea tag
txtarea = document.getElementbyId('txtarea');
txtarea.value = x + " " + y;
Then in the onlcick event of the submit button, call this function.