Methylamine is CH3NH2, and phenylamine is C6H5NH2.
In methylamine, the methyl group exerts a positive inductive effect on the nitrogen atom in the amine group. This means that electrons are "pushed" towards the nitrogen atom. In phenylamine, the benzene ring exerts a negative inductive effect on the nitrogen atom in the amine group. This means that electrons are "pulled" away from the nitrogen atom.
The electron density around the nitrogen atom in methylamine is greater than the electron density around the nitrogen atom in phenylamine, so the lone pair of electrons on the nitrogen atom are more easily donated to a proton by methylamine than phenylamine. Methylamine is a stronger base.