You cap both ends and the as the dry ice turns to gas and the pressure builds it pops the dent out.
i have fixed the pipe on my bike twice now but filling it all the way up with water and than putting a cork in both ends and sticking it in the freezer