Answer:
9 and 29.
Let us denote the older brother’s age 4 years ago by x and the younger brother’s age 4 years ago by y
Their combined ages 4 years ago is 38–8 =30
So we have the equation x+y=30
We also know that x=y^2
X=25 and y=5 will satisfy that condition
So 4 years ago the older was 25 years old and the younger 5.
4 years later the older brother is 29 years old and the younger brother is 9