The answer depends on what lies beyond the solid line. Both lines here are
edge lines, and crossing them is generally banned. There is one exception: you may cross an edge line to stop on the shoulder and then pull out from where you stopped, if stopping is allowed there. In case B, beyond the right line is the shoulder, which is meant for stopping, so you may pull onto it. In case A, beyond the left line is the median between the roadways: it is meant neither for driving nor for stopping, so the exception doesn't work there