I don't know if you are expected to validate the data input (in other words to check that x lies between 1 and 10, and that y has x digits), but the pseudocode I've written here assumes that you are. If you haven't covered this sort of data validation, then you can simplify the program by omitting the loops after the two input statements.
Code:begin input x loop until (x > 1) and (x < 10) input x end loop input y loop until y has x characters input y end loop i = 1 loop until i = x output leftmost i characters of y output " " output rightmost (x - i) characters of y output newline character i = i + 1 end loop end
You'll see that the first input statement comes before the validation loop that checks that x is in the right range (and I'm assuming that x lies strictly between 1 and 10; x = 1 would not produce any output). If the first input value of x is OK, then the loop won't be executed at all. But if x is not valid, then you'll stay in that loop until it is.
The second validation loop, following the input y statement, works in the same way.
i is a counter for the main loop. It is set equal to 1 before the loop starts; the loop then outputs the required string of characters, and a newline, before incrementing the value of i. Exit from the loop will occur when i = x. (In the example you gave, outputs occur for i = 1, 2 and 3, but not for i = 4.)
I haven't included detailed instructions about how the program would validate the length of y (checking that it has x characters), or how it would output the leftmost or rightmost n characters. Nearly all programming languages will have functions that will allow you to do this in a single line of code.
I hope that you understand how this works. Let us know if you need any further explanation.