Input Resistance vs Output Resistance
Disconnect the source. Calculate the equivalent resistance seen across the open terminal Vi. That's Ri.
Disconnect the load, as well as short the voltage source (prefect voltage sources have zero resistance). Calculate the equivalent resistance seen across the open terminal Vo. That's Ro.