For the first part, (x/a) - 1 = (x/b) + 2 . I would solve it this way.

(x/a) - 1 = (x/b) + 2

(x-a)-(a/a) = (x/b) + (2b/b) ....... ( Group them together as they have same denominator )

(x-a/a) = (x+2b/b) ................ ( cross multiply )

xb - ab = ax + 2ab

xb - ax = 2ab + ab

x( b - a ) = 3ab

x = 3ab / (b -a)