We present the heavy-to-light form factors with two different non-vanishing masses at next-to-next-to-leading order and study its expansion in the small mass. The leading term of this small-mass expansion leads to a factorized expression for the form factor. The presence of a second mass results in a new feature, in that the soft contribution develops a factorization anomaly. This cancels with the corresponding anomaly in the collinear contribution. With the generalized factorization presented here, it is possible to obtain the leading small-mass terms for processes with large masses, such as muon-electron scattering, from the corresponding massless amplitude and the soft contribution.