Aromatic amines are least basic as the lone pair of electrons on the nitrogen are not freely available due to the presence of the conjugated ring.
The secondary amines are most basic here as both the −R groups are electron-donating to the nitrogen, thereby the electron density increases on the nitrogen.
Hence, the order is C6H5NH2<NH3<CH3NH2<(CH3)2NH