Draw a perpendicular from O' to AB, lets call the point of intersection as P.
let l be the length of the string.
l = A'O' + O'O
= A'O' + √ AA'2+OP2
differentiate w.r.t time
dl/dt = 0 = v1 + (1/2)*[2OP(v2-v1)]/√ AA'2+OP2
OP/√ AA'2+OP2 = cos(alpha)
thus v2 = v1(cos(alpha)-1)