First we have to bring them to the same level.
We have two choices
to transform 10∧-31 to 10∧-27 or to transform 10∧-27 to 10∧-31
First
proton has a mass 1.67 x 10∧-27 kg
electron has a mass 9.11 x 10∧-31 kg= (9.11/10∧4) x (10∧-31 x 10∧4)=>
= 0.000911 x 10∧-27 kg
They are now at the same level and we can compare them.
As we can see the mass of the proton is greater than
the mass of electron because 1.67 is greater than 0.000911.
You can do it in the second way at the same manner.
Good luck!!!