I'm assuming that it's the brake light comes on with front lever, but not the rear pedal when you say "rear brake light". Both should work. If it's just the pedal that won't turn on the light, it's probably the switch. It,s ususally right above the pedal, and is pulled on by a spring hooked to the pedal.Sometimes th spring loses its tension, or comes off, or the switch, which sits in a socket on the frame, gets cockeyed and won't come on. The switch has an adjusting nut on it, which makes up for a sacked spying by moving the switch further away from the pedal when you tighten it. Sometimes the switch just stops working. Try these things before worrying about anything else.
I don't want a pickle, I just wanna ride on my motorsickle