Controlling Nd-to-Yb energy transfer through a molecular approach