I cough ribs out of place all the time! I have to exercise and strengthen my back to minimize how much it happens. Coughing so much muscles hurt more around the rib cage or a general area. Coughing a rib out the pain is localized and doesnt go away and hurts in different positions. Also you can reach back and feel next to your spine the rib up a little higher than the rest. I see a chiropractor and have found that yoga is a HUGE help in keeping my alignment, clearing my lungs, and strengthening my body in a kind and gentle way. Plus I can do some form of yoga more regularly and cant keep exercising at the gym so regular because of getting sick or waves of less energy.