Keyboard&trackpad not working A1278
So i got this macbook 2008 from a seller. He stats that the keyboard and trackpad occasionally goes on and off. So i bought it home and the thing is that, i can access safe mode etc when i press the buttons (so that means the keyboard is working right?) But when i went to the sign in page ,both the trackpad and the keyboard are not responsive, but there is backlight emitting from the keyboard.
When i went to system preferences->keyboard, the 'use all F1,F2 etc...' tab keep appearing and disappearing. Whereas when i went to the trackpad, they state Bluetooth device not found.
I'm new to this community and i hope someone is able to help me.
MacBook