That's somehow neither of my suggestions but also a possibility. As Hassat Hunter said, your sub2 function is never triggered.
To help you understand that, here's what a KotOR script does: It has either a void main() function or a int startingConditional() function if it's a conditional script. void or int are the return type of the function. void main() is used in "normal" scripts and returns nothing as it just does some stuff. int startingConditional() returns an integer (0 or 1, i.e. true or false) that is used for conditions in dialogs. Since yours is a normal script, the main function will be called. The first thing it does in your case is to call another function called sub1() (which turns REThug5 hostile). Then it proceeds to turn REThug4 hostile itself.
The problem here is that sub2() is never called, so it will never be executed and does nothing.
And then there's the other problem in your sub2() function. You declare variables int2 and string2, but then later in the function you check for int1 and string1, but these variables don't exist inside sub2() as you never declared them. So you need to either rename your int1 and string1 to int2 and string2 or vice versa. Since those variables are only used inside a function, it doesn't matter that their name is the same as the variables in sub1(). They're only declared locally, inside the function.
That just goes to show how horrible I am with this sort of stuff.