What happens to the image on the screen when the lens is moved closer to the screen what happens to the image when the light source is moved closer to the lens?

Actually, your first image is misleading. It makes you think that the only light that is emitted by the effective object is a thin cone that gives you a rather small blurry spot at the plane $C$. But that's not quite correct: you've forgotten that the rays from the actual object are emitted not only parallel to the optical axis and through the lens center, but also quite away from the lens center. Let's redraw the ray diagram:

What happens to the image on the screen when the lens is moved closer to the screen what happens to the image when the light source is moved closer to the lens?

Here I've made the lens much larger (more ideal in the sense of preserving more of the ray directions), so as to catch the rays you forgot. Now this does look quite like your second image, doesn't it?

So, the first answer is that the smaller the lens, the larger the depth of focus.

But that's not all there is to it. Consider a flat picture that we are to take (sort of) a photo of. If we put it on a scanner, which would play the role of the photographic sensor at the plane $B$, we'll capture the image perfectly in focus. Let's now put some air gap between the scanner working surface and the picture. This would mean that we've displaced the scanner from plane $B$ to plane $C$. Do you think we'll get nothing at all? Actually no, the closer the picture to the scanner's working surface, the less blurry the scan will be. It won't abruptly lose all the detail just because we've moved the scanner a tiny bit from $B$.

Why is it so? It's because of Lambert's cosine law: as the angle of scattering increases, the amount of scattered light decreases, reaching zero at 90°. So if our picture at the plane $B$ were the Malevich's Black Circle*, with a white hole made somewhere in the middle (don't try this at the museum), the light scattered from this hole would reflect mostly in the specular direction, with less light in other directions, so that at plane $C$ we'd have more light at the point that the specularly-reflected ray crosses, and some less light around it.

But even if our picture is not a Lambertian scatterer (as isn't e.g. the Moon's surface), there's another factor. Our plane $C$ is planar, not circular, so the light emitted by the effective object at $B$ would spread out more at the periphery than at the point where the shortest line segment between the effective object and $C$ crosses $C$. This will also reduce the circle of confusion.

*Why not the more famous Black Square? Because it's now not in a good shape: it's covered in noticeable craquelure, so the it'd be a bad example of uniformly black surface.