This pilot research trial studies circulating tumor deoxyribonucleic acid (DNA) in predicting outcomes in patients with stage IV head and neck cancer or stage III-IV non-small cell lung cancer. Studying circulating tumor DNA from patients with head and neck or lung cancer in the laboratory may help doctors predict how well patients will respond to treatment.