Had a bad headache, running nose and cough last week. Those symptoms are over but for 2 days yellow mucus with blood. What could this be?

Resid inflammation. Most likely you have some minor residual inflammation left over form your viral/allergy medicated cold you had last week, that shows as pinkish tinged mucus. Stay well hydrated and if that does resolve soon, see the dr. Best wishes.
Residual infection. If does not improve in a few days see your doctor to check for a sinus infection. You can try a saline nose spray to clear out the nose.