Let's present ages of husband,wife & child are x,y,& z respectively.
3 years ago,
(x-3)+(y-3)+(z-3)=27
=> x+y+z=90...............................(i)
5 years ago,
(y-5)+(z-5)=20
y+z=50....................................(ii)
therefore
x+50=90.........(put value of y+z=50 from (ii) into (i)
x=40
Ans: present age of husband is 40 years