let the age of ahmed three years ago be x years old. since 3 years ago ahmed as one third of his sister's age, his sister would be 3x years old 3 years ago.
in a year's time, ahmed would be x+4 years old and his sister would be 3x+4. we also know that in a year's time ahmed's age doubled will match his sister's age. hence 2(x+4)=3x+4
2x+8=3x+4
4=x
x is the age of ahmed three years ago. hence, now ahmed is 7 years old.