The second question is the easiest of all: Get a chip of the old paint, a size of a silver dollar will work, then take it to a paint dealer, not a home center, and they will computerize match it.
If you have the old formula, soo much the better.
The first question is the toughest.
Square out the hole, taking the sides up to the next wood joists or ceiling joists. make a neat retangular or square hole.
Now, sister some 2x4's next to the exposed joists, these sisters will give you something to nail the new patch drywall to.
Now, fasten the patch rock in the hole and dont worry if it does not fit just exactly. Your tape and mud will fix this.
Now, use flex tape and apply the mud. Use 20 minute set so that you don't have to wait 24 hours for curing so you can sand.
Take a piece of sand paper and sand down smooth the mudded areas. then apply more. Do this three times. Each time the mud shrinks and this just makes a nice smooth joint.
When dry, go to a paint store and get that accoustical spray in a can. One can does about one square foot and let me tell you, when you push that trigger, be ready because the whole can will empty quickly. Have a plan, drop cloths and be ready. This stuff is very expensive and does not go far.
FYI, this is used only if you do not have a hopper and can spray it the way it was done originally.
Try your best to match the density of the surounding popcorn. Then when your done, wait for this to dry.
Now the last step, when your sure the stuff is dry, then spray on the paint to the area. I say spray because if you roll or hand brush, so much of the stuff will fall off. Spraying is better, but if no sprayer, then lightly roll or brush. Be gently and have allot of cloths around.
Youve got it.
Disclaimer; others may have a different method of application and as usual there are many ways of doing this. This is just the way I do it.