Precise exoplanet characterization requires precise classification of exoplanet host stars. The masses of host stars are commonly estimated by comparing their spectra to those predicted by stellar evolution models. However, spectroscopically determined properties are difficult to measure accurately for stars that are substantially different from the Sun, such as M-dwarfs and evolved stars. Here, we propose a new method to dynamically measure the masses of transiting planets near mean-motion resonances and their host stars by combining observations of transit timing variations with radial velocity (RV) measurements. We derive expressions to analytically determine the mass of each member of the system and demonstrate the technique on the Kepler-18 system. We compare these analytic results to numerical simulations and find that the two are consistent. We identify eight systems for which our technique could be applied if follow-up RV measurements are collected. We conclude that this analysis would be optimal for systems discovered by next-generation missions similar to TESS or PLATO, which will target bright stars that are amenable to efficient RV follow-up.