Don't create weired functions or macros, as many advanced users may suggest you, but learn simple commands, which can help you when you would need to make similar, but slightly different substitution.
My solution would be: place cursor on the comma, and type: xxdw^Pa <C-[>
Description:
xx
- delete comma and space
dw
- delete word
^
- place cursor on the beginning of text in line
P
- place deleted text before cursor
a
- add space after word
<C-[>
- escape to return to normal mode, you can also press <ESC>
if you like, or don't press at all
And how to place cursor in comma? Learn about f,, F,, t,, T,, w, b and e to move faster around your text.