Find all files with the extension .txt in the current directory and its subdirectories, and for each of those files, use the sed command to swap the first two words in each line.
find ./ -name '*.txt' | xargs -I{} sed -r -i 's/([^ ]+) ([^ ]+)/\2 \1/' {}