Here the word "minds" refers to their attitudes towards the Israelites. Alternate translation: "Pharaoh and his servants changed their attitudes about the people" (See: [[rc://en/ta/man/translate/figs-metonymy]])
They asked this question to show they thought they had done a foolish thing. This rhetorical question can be translated as a statement. Alternate translation: "We have done a stupid thing by letting Israel go free from working for us!" (See: [[rc://en/ta/man/translate/figs-rquestion]])