The hardest part is to get started by measuring one particle's mass. Once you have that, you can get the others more easily because ratios of masses are easier to measure than absolute ones. You're quoting values that are good to 8 sig figs, and I'm sure the experiments needed in order to get that kind of precision are extremely complex. I'm going to describe how to measure them with much less heroic precision, using the kind of equipment you could find in a high school with a well equipped physics and chem lab. To this kind of precision, the masses of the neutron and proton are the same.
You say you know how to measure the electron's mass, but just to be concrete, let's say that we'll do that by measuring the wavelengths in the emission spectrum of hydrogen and solving the equations in the Bohr model to get the electron's mass.
Next, we can measure the charge to mass ratio of the electron $-e/m_e$ by accelerating electrons through a known potential and then measuring their deflection in a magnetic field.
Now measure the charge-to-mass ratio of some element such as sodium by doing electrolysis and finding the ratio of how much charge flowed around the circuit to how much mass was deposited on the electrode. Since we know how many neutrons and protons there are in sodium, we can infer the charge-to-mass ratios $e/m_p$ and $e/m_n$ (which, to our precision, are equal).
Finally, since we know $m_e$, $-e/m_e$, $e/m_p$, and $e/m_n$, it's straightforward to find $m_n$ and $m_p$.