If you ask me which one you should learn? The answer is depend where you want to go? Learn Melayu if you want to visit Malaysia, or If you choose to stay in Indonesia then Bahasa should be the best one. Remember even tough people in both countries understand this two language, it will be odd if you speak language where not belong to.
Lets say, you speak melayu in Indonesia. People will consider you as a foreigner and you might have a bit harder to blend with others. It also happen in Malaysia, they will know you when you speak Bahasa. All right to make you understand about the different between Bahasa and Melayu, Lets say about British English and American English.
You know as long as people can speak English well they might understand both British and American. Ya we can say British is Melayu and American is Bahasa. Both of them are very similar but it is different. Now I hope you understand about melayu and Bahasa. Oh yaa remember melayu also known as malay so do not get confuse when they say about Malay or melayu.
Actually you may speak English in both country. Especially if you visit Malaysia, many people in this county also use English. Go to the old history, Malaysia was colonized by English country, so the language become an inherit from the predecessor until now English become as a recognized language in Malaysia. Unlike Indonesia, English is a foreign language. So the population of Indonesia who can speak English is not as much as in Malaysia. Well it might still easy to find people who speak English in Jakarta (capital city of Indonesia) but if you intent to go to the remote area, then English might not be recognized.
Well I hope those illustration will give a little explanation about Bahasa and Melayu. I hope now you have a little knowledge about those two languages. After that you might be able to decide which one is the best language for you to learn as a priority. Good luck.