Applescript Access Variables Through Run Script
For the variables to persist in the same scope, you have to run your whole variable switcharoos in the same run script command.

This demonstrates how to add variable to the text of the run script. It would return a list of results from the variables. However, this/your script doesn't work because you're assigning rand+1 to rand2+1, before the variable rand2+1 has been assigned. I do not know what it is you're trying to accomplish, so can't fix more of your script.
But, this answers your specific original question, syntax for adding variables into the text of a run script string.

repeat (random number from 0 to 5) times
    set rand2 to (ASCII character ((random number from 0 to 7) + 97))
    set rand to (ASCII character ((random number from 0 to 7) + 97))
    set switch to rand2

    set scriptText to ("set " &amp; rand &amp; "1 to " &amp; rand2 &amp; "1" &amp; return &amp; ¬
        "set " &amp; rand2 &amp; "1 to " &amp; switch &amp; "1" &amp; return &amp; ¬
        "set " &amp; rand &amp; "2 to " &amp; rand2 &amp; "2" &amp; return &amp; ¬
        "set " &amp; rand2 &amp; "2 to " &amp; switch &amp; "2" &amp; return &amp; ¬
        "return {" &amp; rand &amp; "1, " &amp; rand2 &amp; "1, " &amp; rand &amp; "2, " &amp; rand2 &amp; "2}")
    set theResult to run script scriptText
end repeat