You should understand that whenever n takes a value, there is always a value of k that makes 4k+ 1=2n- 1 or 4k- 1=2n- 1.
That is, for every n value, there is always a corresponding k value, so k=(2n-2)/4=(n- 1)/2 or k=n/2 holds.
Because k is also an integer, it is obvious that when n is odd, k=(n- 1)/2 holds, and k=4k+ 1.
When n is an even number, k=n/2 holds, and x=4k- 1.
In your example, when n=2, the corresponding k= 1 is substituted into x=2n- 1 and x=4k- 1 respectively, and x is equal to 3.
The other n and k you bring are the same law, so you can take any value instead of it.