Algorithm books like to be confusing. The for loop in your example will run n-m+1 times so that becomes the complexity and it'll be multiplied by the complexity of the inner loop. I'll try to demonstrate.
I'll use an example of two while loops because basically a while loop comes out to be the same thing as a for loop in time analysis.
Basically the time analysis on a while loop amounts to
twhile being the time of the while loop
tbody being the time of the body of the while loop
tcond being the time of the conditional of the while loop
"r" being how many times the body is to be run
The reason tcond is there at the end is because it will be ran again and become false at the end of loop.
So if you have loops inside of loops for instance:
Then we'll call the first while loop T1while and the second while loop T2while so T1 become
As was said it's due to how the list are compared.
If you want to run the > operator against each pair from the lists you can use zipWith or in the case of [Int] you can sum them and then compare them.