Calculating the resistor needed to replace batteries with another power supply
In general you can't do this kind of thing with a resistor because the current drawn by (in this case) the active speaker is NOT CONSTANT. The resistor would have to adapt itself constantly to the required current to keep the voltage at 3V. 

Luckily, this 'adaptive resistor' does exist, it is called a voltage regulator. Within its limitations (maximum current, input voltage, dissipation, some capacitors required) such a gadget can convert a voltage to a fixed lower voltage. Your Pi contains one, because its processor runs at 3V. Its 3V output is available on the extension connector, but according to the specs it can provide only 50mA. My guess is that your speaker draws more, so you'll probably have to add an extra voltage regulator. You could use a 3V3 MCP1702, or use the more commonly available LM317 with two resistors to set it to 3V.

It might be worth checking what is inside your speaker. If you find a chip and give us its number we might be able to guess whether it can use 5V directly.