89 5-series 2.8 into '77 3-series not good idea
The '89 has an OBD I computer and fuel injection control, along with electronic ignition. The wiring harness is so radically different that I doubt you can get the 2.8 to work in the 3 (although the engine itself can be made to fit.) There are better projects to work on than this.
The brakes probably can't be made to work, either - the cars have different hubs (5-bolt rather than 4-bolt) that I don't think will fit. You'd also need the 5-series booster and stuff, since it's 4-wheel disk rather than disk/drum.