On the third problem of Halmos on Banach spaces