Let, the age of Daniel be x years and Kevin be y years.
Given, Kevin is 3 years older than Daniel.
So we can write the equation as y=x+3
Also given, 2 years ago Kevin was 4 times as old as Daniel.
2 years ago, Daniel's age = (x-2) years
2 years ago, Kevin's age = (y-2) years.
So we can write the equation as (y-2) = 4(x-2)
We have got the two equations
y = x+3 ..... equation 1
(y-2) = 4(x-2) ..... equation 2
Now we are plugging in the value of y from equation 1 to equation 2
x+3-2 = 4(x-2)
x+1 = 4(x-2)
Now we have to distribute 4 in the right side.
x+1 = 4x -8
We will have to take x in one side. so let's move 4x to the left side by subtracting it to both sides.
x -4x+1 = 4x-4x -8
-3x+1 = 0-8
-3x+1 = -8
Now we have to move 1 to the right side by subtracting 1 from both sides.
-3x +1 -1 = -8-1
-3x+0 = -9
-3x = -9
Now we can get x by moving -3 to the right side. As -3 is multiplied there so we can move it by dividing both sides by -3.
-3x/-3 = -9/-3
x = 3
So we have got the required answer. Daniel is 3 years old.