Так понятно?
fun main() {
var y = 20
var x = 0
for (outer in 1..3) {
println("outer before $x $y")
for (inner in 4 downTo 2) {
println(" inner before $x $y")
x += 6
y++
x += 3
println(" inner after $x $y")
}
y -= 2
println("outer after $x $y")
}
println("$x $y")
}