Converting word problems to math equations