The crucial point is that \(\displaystyle 2^k\), as you repeatedly divide by 2, is always an integer (so you don't have to worry about the "integer" part) and always a power of two.
For example if k= 4 (and \(\displaystyle x= 2^4= 16\)) then f(x)= 2f(8)+ 1. But f(8)= 2f(4)+ 1, f(4)= 2f(2)+ 1, f(2)= 2f(1)+ 1, and f(1)= 0. So f(2)= 2(0)+ 1= 1, f(4)= 2(1)+ 1= 3, f(8)= 2(3)+ 1= 7, and f(16)= 2(7)+ 1= 15.
Hey, that's just \(\displaystyle x-1\)! I could try to prove that works for all x BUT I see that n-1 is one of the answers and none of the other answers are 15 for n= 16. Ah, the joys of "multiple guess" questions!