The first point is to clearly establish if your friend coughed up blood, or vomited blood after
a bout of coughing
. Often patients cannot definitely distinguish between the two.
The fact that the quantity was a "lot" makes me suspect that the latter was the case. Vomiting blood may be related to ulcers, gastritis, alcohol, anxiety etc.
Coughing a lot of blood is seen in some cases of lung cancer, although it is more usual to have blood-streaked sputum.