Some results on bellman equation in Hilbert spaces and applications to infinite dimensional control problems