Help me get electricity

Why isn't this giving electricity into the outlet and is this safe? Previous owners had it wired like this. Will I need to change the outlet?