What speed is my Shimano Nexus 8 Hub in?
Put your shifter in 4th gear. Adjust the cable tension so that the yellow lines match. There really isn't more to it. Not much to do wrong. If you can then shift all the way up to 8 and down to 1, the basic installation is correct.

However ... from my experience, these hubs change a little over time. Mine (Alfine 8, basically the same thing) shows slippage in some gear every time I re-install it. After aligning the yellow lines, try to slacken the cable a little bit. This could be closer to the setting the hub was before you changed your tire.