Are Tri-state buffers even necessary?
The other approach is to use a multiplexer, commonly called a "mux". This is a gate that uses a "select" input to choose which input to copy to its output.

If the select input is "S", then the expression for a mux is (A AND S) OR (B AND NOT S).