So I'm studying for my data structures midterm that's this monday, and my professor gave out a sample midterm with the answers, but I'm having a hard time understanding one of the questions.
Here's a screen cap:

Could someone give me a walk through of the math that's happening in each step? And possibly a conceptual explanation in computer science terms?