Wire up the red wire to the battery/starter cable. Turn the key to start and you should hear the relay click.
Next, connect the yellow wire to the starter pin on the right in the pic, turn the key to start and it should fire the starter and turn over. If not, try the next terminal on the starter solenoid. If it is the wrong pin, assuming the starter solenoid is a genuine Bosch unit, nothing will explode.
If the wiring worked with the old starter then it should work here without change (save for the pin/connector being different to the genuine starter solenoid).
As for the brown wire, connect it to one of the other pins, they may be the same, cannot say for sure. Ideally once it is turning over a test light on the secondary pins will tell you if it connects when the starter fires - as I think James mentioned above. There should be 12v at the second pin/s when cranking/starting, then nothing when the starter is no longer turning.
If your engine is in tip-top shape you can probably go without the brown wire as it sends 12v to the coil when starting then drops to 8-ish volts when running (there will be a resistor in there to drop the voltage) when the starter stops turning and that brown wire loses the 12v feed.