RATIONALE: Treatment with radiosurgery, temozolomide, and erlotinib may affect brain function (the ability to think, learn, remember, and judge) in patients with non-small cell lung cancer and brain metastases. A study that evaluates brain function may help doctors plan the best treatment.