[Ref Air Pilot’s Manual – Air Navigation P.47, Web]
Aircraft Heading + Relative Bearing = Magnetic Bearing
[MH + RB = MB]

Example:
MH = 45º ; RB = 205º
Formula: MH + RB = MB, so
Magnetic Bearing = 45 + 205 = 250º
Example 2:
MH = 135º ; RB = 315º
Formula: MH + RB = MB, so
Magnetic Bearing = 135 + 315 = 450º → 450º -360º = 90º
Don’t you understand still? Please watch the footage below or click into a simulator.