Please pay attention to the word "-와 같이" which is usally combined with noun so that means 'together'. The subject 'I' live with friend 'together' in the dormitory.