This phase I trial studies the side effects and the best dose of alisertib when given together with vorinostat in treating patients with Hodgkin lymphoma, B-cell non-Hodgkin lymphoma, or peripheral T-cell lymphoma that has come back. Alisertib and vorinostat may stop the growth of cancer cells by blocking some of the enzymes needed for cell growth.