An Indigenous teen was allegedly murdered amid a "complex series of events" that started with tensions between two boys over a girl, a court has been told.