On a connection between first and second order differential equations in banach spaces