Linear equations and word problems