I have done the gearbox replacement job both ways. While it is generally recommended to drop the whole motor & gearbox it is possible and potentially quicker to drop the gearbox out from the back. It is also slightly harder work :-) Note this doesn't work with a car with power steering, the steering rack fouls the gearbox - been there, done that !!
If dropping the box out the back, you need to take the distributor cap & rotor off first otherwise it will get broken as the engine tilts back. Lining everything up and getting a reluctant box back on a sloping engine from under the car is do-able, but can either go easy or really hard if things aren't quite properly lined up.
The gearbox on the 1.7 will almost inevitably be a 3.7 final dive ratio. The 1.5s are generally a 3.88 ratio. To know for certain, you can take the base plate off the box and count the teeth on the crown wheel & pinion. (e.g. 37t and 10t 37/10=3.7)
I have a 1989 S2 33 with a 3.88 box running a 1.7 carbied engine, and it works well. The 3.88 box is not as "long" as the 3.7, and I find it a better compromise, except perhaps for very long high speed running on motorways. Being geared down a little, it gives the car a little more "zip".
If you have the box off, do check the clutch while you are in there, nothing worse than finding out after a few weeks that it needs work too. If you do, try to get hold of an old 33/sud gearbox input shaft to line up the clutch assembly. Make sure that it can slide in & out freely, otherwise the gearbox is a complete pig to reunite with the engine.
Very best of luck with the job.