Instead
むしろ
Means “instead” or “rather”.
Example
むしろ自転車で行こうと思います。 I think I’d rather go by bike.
代わりに
V
い-Adj
な-Adj + な
N + の
+ 代わりに
代わりに means “instead of”, “in exchange for”. Generally used about things. Does not have a notion of replacing in a temporal transition, more like a one off occurrence.
Examples
今朝自転車の代わりに地下鉄で行きました。 I took the train this morning instead of biking.
にかわって・にかわり
Means “instead of”. Generally used about persons. Also has a notion of “taking over” as in replacing in a temporal transition. にかわり is more formal than にかわって. Used with nouns.
Examples
私に代わって妹が行った。 My sister went in my behalf.