Red and green lights

Please who can help me please I'll be grateful
E320 1996
there is something wrong with my electrical that I cant figure out, but this seems to be the cure from time to time.
i just ignore the car once had keyless.
And the engine start working but that's too expensive mor than 500$ in here UAE
That's way I'm looking for solving the problem without changing the whole system...



