There are two problems here.
1. The earth is already moving with about 30km/s around the sun. You only need to have about 12 km/s left after escaping the earth.
2. If you leave the surface of the earth with speed v (v > 11.2 km/s),
you will have kinetic energy (1/2)mv^2 with respect to the earth. The residual energy after getting far away from the earth will be (1/2) m (v^2 - 11.2^2), and this will need to be equal to the kinetic energy of the 12km/s residual speed you need,
so you get v^2 - 11.2^2 = 12^2 => v^2 = (11.2^2 + 12^2) => v = 16.4 km/s
This will be a speed of about 46.4 km/s with respect to the sun