The problem is (d-1)/5 = (d+1)/3.
Whatever you do to one side of the equation, you must do to the other side.
Flip the ratio on the left side, and multiply to get 1.
5/(d-1) x (d-1)/5 = (d+1)/3 x 5/(d-1)
5(d-1)/5(d-1) = 5(d+1)/3(d-1)
1 = 5(d+1)/3(d-1)
1= 5d+5 / 3d-3
3d-3 = 5d+5
3d-3+3=5d+5+3
3d=5d+8
3d-5d=5d-5d+8
-2d=8
d=8/-2
d=-4
Now check your answer in the equation.
(d-1)/5 = (d+1)/3
(-4-1)/5 = (-4+1)/3
(-5)/5 = (-3)/3
-1=-1
Done.