The threaded rod I pointed to in the picture is the part you need to unscrew. The little locknut with a larger diameter to the left needs to stay in place. When you put the wheel back on you will screw the threaded rod back down tight to the locknut and hopefully it will shift fine. But most likely you will have to make an adjustment or two to get it shifting correctly again.