The correct function rule that represents the total number of miles \( M \) the car will have on the odometer after \( w \) weeks is:
\[ M(w) = 121,358 + 255w \]
This means that the car starts with 121,358 miles and accumulates an additional 255 miles for each week \( w \).