(b) 1 > 3 > 2 > 4
Protonated compound of I is stabilised by two equivalent resonating structures, hence compound I should accept H+ most readily.
Further 2° amines are more basic than 1° amine, while amides are least basic because electron pair on nitrogen is involved in delocalisation.