 This phase I trial studies the side effects and best dose of giving vorinostat and sorafenib tosylate together in treating patients with kidney or non-small cell lung cancer. Vorinostat may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. Sorafenib tosylate may stop the growth of solid tumors by blocking blood flow to the tumor. Giving vorinostat together with sorafenib tosylate may kill more tumor cells. 