I took acid as HxA where A is anion. And the equation became
HxA + Mg -> MgxA2 + H2.
Then we know eq. wt. of H, Mg also we know the wt. of salt and acid.
I used concept that no. of gram eq. weights are equal. Also eq wt of acid = eq wt of H(1.008) + eq wt of anion (this is unknown say 'e') and eq wt of salt = eq wt of Mg(12) + ew wt of anion. And by solving
wt of acid/eq wt of acid = wt of salt/eq wt of salt.
I got e=35.38. Thus eq wt of acid=e+1.008=36.39.
Is this correct or not? But the ans given is 36.5.