Let age of B now be x. A is 15 years older than B.
So, Age of A = Age of B+15=x+15.
So, Age of A now= x+15
Age of B now=x
Ten years ago, they both will be 10 years younger.
So, 10 years ago, age of A will be age of A now minus 10= x+15-10=x+5.
Also, age of B 10 years ago= Age of B now-10= x-10
Given, 10 years ago, A was four times B's age.
So, x+5= 4 times (x-10)
So, x+5 = 4(x-10)
x+5=4x-40
3x=45
x=45/3=15
So, x is 15.
So, Age of B now= x= 15.
Age of A now= x+15= 30.