This has less to do with execution context and everything to do with function variable scope. You're passing in 'the hello argument' as an argument to the function and being local it is used instead of the hello var declared outside of the the function.
The var hello does nothing and if you were using use strict or a linter would probably raise a warning (trying to declare an existing variable).
If you changed it to var hello = null; you would see a change to the output.
Now, if you had the following code:
var hello = 'hello is assigned';
function prison() {
console.log(hello);
var hello;
console.log(hello);
}
prison();
...you would get undefined for both logs. This would be due to variable hoisting - variable declarations are moved to the start of a function before execution - so the code would actually appear like so:
function prison() {
var hello;
console.log(hello);
console.log(hello);
}
hello is undefined in both cases.