Feasibility and Transferability of Transfer Learning: A Mathematical Framework