This is a good instructional example for a student :)
This is a fundamental problem when designing a bidirectional bus. And actually the problem stays the same even if you delete the two transceivers in the middle of the circuit (just connect master directly to slave). Both your master and your slave have a port labeled "I/O" so you need to determine when to enable the output driver on the I/O pin for each of those ports. If you enable both output drivers, it won't work.
With the transceivers in the circuit, you still have the same problem -- as you've pointed out, if you enable all the drivers the circuit simply doesn't work. You either need to enable the drivers for the data to flow "to the right" or for the data to flow "to the left".
You will need to add some logic to the circuit (some extra control lines and/or some software protocol) to set up the bus to drive data in the correct direction at the correct time.
By the way, if you actually build this circuit be sure to put some pull-up or pull-down resistors on that bus too, because it's a bad idea to leave a bus floating. Ask your professor for details.