Well, I wrote this shorter code :
#PB: Maxime is 32 years old.
#It is twice as old as Albane was when he was the age Albane has now.
#What is Albane's age?
# m = age of Maxime a = age of Albane, x = age difference
var ('m, x, a')
e1 = m - a == x
e2 = m == 2 * (a-x)
solution = solve([e1,e2],x,a)
show(solution[0])
print 'the age of Albane is', solution[0][1].rhs().subs(m=32)
The output is :
[x=14m,a=34m]
the age of Albane is 24