In line 4 you are declaring a new variable called a in a new scope, as such the outer one will be hidden until the block completes. So when a is assigned 20, once the block ends it will be lost and line 8 will refer to the first a which is 10. Btw, your output is 10_15.

You shouldn't use names twice like that, and if you do any nested ones will hide the outer ones.