Welcome to the forum.
The pain in your right upper side of rib and the breathing problem may be related to a muscle spasm or a lung disorder. A physical examination is necessary to find out the exact cause.
I suggest you to consult your general physician nearby for a detailed examination. Meanwhile you can do a hot fomentation and apply a local analgesic
gel on the area to relieve the spasm.