Call your veterinarian or an crisis clinic immediately; coughing up blood (hemoptysis) can be an emergency. keep the Doggy quiet, Observe how much blood you see, and do not give any human medicines.
prevent the Bleed: https://jeaneogp781349.blogdomago.com/36348387/what-to-do-once-your-doggy-is-coughing-up-blood