First, let the age of Leah be represented by #l# and the age of #Tanya# be represented by #t#:
The current age differences between Tanya and Leah can be written as:
#t = l + 12#
We can write the age difference three years ago as:
#t - 3 = 5(l - 3)#
We can subsitute #l + 12# from the first equation for #t# in the second equation and solve for #l#:
#t - 3 = 5(l - 3)# becomes:
#(l + 12) - 3 = 5(l - 3)#
#l + 9 = (5 * l) - (5 * 3)#
#l + 9 = 5l - 15#
#-color(red)(l) + l + 9 + color(red)(15) = -color(red)(l) + 5l - 15 + color(red)(15)#
#0 + 24 = -1color(red)(l) + 5l - 0#
#24 = (-1 + 5)l#
#24 = 4l#
#24/color(red)(4) = (4l)/color(red)(4)#
#6 = (color(red)(cancel(color(black)(4)))l)/cancel(color(red)(4))#
#6 = l#
#l = 6#
Leah is 6 years old.