Couple things. First, d = (0.5-3.5m)/3. Second you can not uniquely solve a single equation with two unknowns. You have an "under-determined" system, meaning you have more variables than you have equations. The best you can do is solve one variable in terms of the other, which will in term determine a line containing all solutions to your equation.