There are many ways to physically mount your MinIMU to your mbed expansion board. You could solder male headers on your MinIMU and having it plug into a set of female headers that are soldered into your mbed expansion board, like it sounds like you want to do. If you are only interested in using the magnetometer, you could also probably just get away with soldering some solid core wire directly into the MinIMU's pins, and either plugging those wires directly into the outermost set of pins on the mbed socket or soldering those wires directly into the m3pi expansion board.
Either way, you will need to make your own power and I2C connections to the MinIMU. (The MinIMU's SCL and SDA lines should be connected to the SCL and SDA lines of the mbed and the MinIMU is supplied with appropriate power to across GND and either VDD or VIN.)