The signs are a bit confusing as you wanted M5 north, but that is not labelled. They actually want you to use the M42 N route as that is what is considered the best route. The M40 ends here so you have M42 west and M42 north. You were directed north because of these signs. Had you followed the sign M42 (W), M5 South West and underneath (Birmingham S&E and Redditch) you would have eventually got to the M5. It is really as long as it is short with both leading to the M6 and busy junctions.Eventually if you had stayed on the M42 you could have accessed the M6 toll road. This is usually empty but worth a fiver to bypass the M6 mess around Birmingham. Maybe a look at maps before setting off might have helped (not being sarcastic) as sat navs, if you use them are a bit hit and miss. There is nothing better than planning ahead.