the lungs are a part of the respiratory system & if a part of a system performs a function then that system performs that function through that part
if the lungs perform a function then the respiratory system performs that function through the lungs