You can extend the wire using a pigtail with wires and nuts of the appropriate gauge. The problem is, all splices/connections/nuts are supposed to be inside a box. So, you can only do this if you have enough room to get a nut in there.
If you are AT ALL nervous about electrical work then get an electrician to do it. It'll be an easy op.
IMHO, electrical work is the one area that it's not wise to be too ambitious about. You mess up some plumbing - yeah, you're out some (maybe a lot) of) money, but it can be fixed. You mess up electrical...you know the end.