What the output mux is doing is selecting which internal part's output is returned based on the memory address:
a[14] a[13] Part
----------------------
0 0 RAM16K
0 1 RAM16K
1 0 Screen
1 1 Keyboard
Because RAM16K is twice as big as Screen, it connects to both 'a' and 'b' inputs.
Because there are no other devices in the memory address space above Keyboard, it is OK to return Keyboard for all of those addresses.
--Mark