Solution of equations in Euclidean and Banach spaces