1.0101g is the mass of the solid in the question
Sorry, I assumed that you understood the working you posted up to the point where you asked about where n = 3 came from.
moles of HCl added = 0.04 mol to make solution A
moles of KOH added for 25cm3 titration = 1.456... x 10
-3 mol
moles of KOH needed for 200cm3 = 8 x 1.456... x 10
-3 mol = 0.011648 mol
moles of HCl reacted before the titration, making up solution A = 0.04 - 0.011648 = 0.028352 mol
Mr = 56 + 17n (from Fe and n x OH)