How can I solve 1/2x+1/x=-12?

I will assume you meant:

1/(2x) + 1/x = -12
times 2x

1 + 2 = -24x
x = 3/-24 = -1/8

if you meant it the way it was typed:

1/2 x + 1/x = -12
times 2x
x^2 + 2 = -24x
x^2 + 24x + 2 = 0
x = (-24 ± √568)/2

= -12 ± √142