First of, the ‘b’ stands for bit, while the B stands for byte. So MB stands for megabyte, and Mb stands for megabit. The Mi, Ki, Gi prefixes are binary prefixes. The difference between Mb and Mibit is that MB represents 1000² bits, while Mibit represents 1024² bits. Same goes for Kb and Kibit.
So if it says 2MB, then its 2 * 1000² * 8 bits, and when it says 2Mb, then its 2 * 1000² bits.
When it’s 2Mibit, then it’s 2 * 1024² bits, and when it’s 2MiB it’s 2 * 1024² * 8 bits.