I'll just let you know that you're incorrect. You can run the program to see the output, if you wanted... You'll want to look up "copy by value" to see why. (Using copy by reference would give the output that you suggested.)
The steps are as follows:
Call f1.
f1 creates variable x, set to 5.
f1 calls f2, passing in 5.
f2 adds 5 to what was passed in (which has NO EFFECT on the x in f1), and outputs that value (10).
f2 ends.
f1 outputs the variable x it has, which has a value 5.
f1 ends.