Gets hot and stalls out

Evening everyone. I was hoping someone could tell me the purpose of these coolant hoses. Why do they run into the firewall? Can they be capped off on the engine? Mine apparently are leaking into the car’s cabin.

View attachment 1716251488
Heater hoses, yes you can cap them off :lol: