If you cut the rubber pieces out and replace the sections with new rubber hose, just be darn sure and use good quality hose temperature and pressure rated for transmission fluid.
Hose rated for the heat and pressures of transmission fluid has a thicker wall construction along with additional cordage for strength.
I have seen some not so smart people over the years use gas hose on transmission cooler line repair and got away with it for a very short time until it bursts/ruptures and leaves the vehicle on the side of the road.
_________________
Supporting Vendor and Moderator of LOST05 Jeep Liberty CRD Limited
Ironman Springs/Bilstein/Shocks
Yeti StgIV Hot Tune
Week's BatteryTray
No FCV/EGR
Samcos/ProVent
SunCoast/Transgo
Carter Intank-pmp
2mic.Sec.Fuel Filter
Flowmaster/NO CAT
V6Airbox/noVH
GM11 Bld.fan/HDClutch
IronrockArms/wwdieselMount98 Dodge Cummins 24 Valve