Hey everydaygame
The cyclization in your reactions is a simple acetaleformation from a diol. You can find the mechanism in almost every organic chemistry textbooks, but to help you i have drawn the mechanism of the acetaleformation in the first reaction (see jpeg attached). The diol is produced in both reactions from reductions with lithiumaluminumhydride. I havent drawn the mechanism for the acetalformation in reaction number 2, but it goes in the same way as the one i have drawn and then you can try that one out for yourself.
Rico