Coupling of a carbon nanotube and graphene nanoribbon by titanium and vanadium chains: a first-principles study