In my view your answer is correct. Among all the compound, 3rd one is the least basic, due to the presence of $\ce{-N)2}$ group which withdraws the electron density of nitrogen and decrease donating capacity.
While comparing $1$ and $2$, 2nd compound is more basic due to the presence of 2 $\ce{-CH3}$ groups as they are electron withdrawing group makes the lone pair of $\ce{N}$ more available for donation.
Now while comparing $4$ and $2$, 4th compound is the less basic, even though $\ce{-CH3}$ groups is present the -I effect of $\ce{-NO2}$ group reduce the the electron donating effect of methyl .