Can the std's herpes and HPV cause lung cancer? Violent coughing and blood in sputum. What's going on? Please help with suggestions.

Chest X-ray. Neither is associated with lung cancer. Multiple possibilities. Go see your primary care, will likely require further evaluation with chest x-ray. Take care of yourself, and if you're a smoker - quit, that can certainly be a cause.
HPV. Hpv can cause head & neck cancers but has not been associated with lung cancer. See your doctor and get an x-ray tomorrow!