How to send two keystrokes that repeat in AppleScript?
You didn't specify how many times the loop will run.
You can try something like this:

tell application "System Events"
    set x to "x"
    repeat 3 times
        keystroke x
        delay 3
    end repeat
    set y to "y"
    repeat 5 times
        keystroke y
        delay 5
    end repeat
end tell