For 1a question can thought as an equation mk+5=27 the k represents any number 1,2,3,...n but you can treat it as k=1 since it is used to find others numbers that can give you x congruent 5(mod m). Any ways so m+5=27 just solve for m and that will give you solution.