Solution:
Concept: In both cases the ray is refracted twice: towards the normal on entering glass and away from the normal on leaving. What differs is whether the two faces are parallel (slab) or inclined (prism).
(i) Labelling the rays
Step 1 — Name the rays.
The incident ray is the ray in air falling on the first face; the refracted ray travels inside the glass; the emergent ray leaves the second face into air.
Step 2 — Mark the deviation.
In the prism, δ is the angle between the incident ray produced and the emergent ray. In the slab the deviation is zero.

(ii) How the emergent rays differ
Step 3 — The prism.
The emergent ray is not parallel to the incident ray; it is deviated towards the base. The faces are inclined, so the second bend does not undo the first: both turn the ray towards the base.
Step 4 — The slab.
The emergent ray is parallel to the incident ray, only shifted sideways. The faces are parallel, so the second bend is equal and opposite to the first.
Therefore, a prism changes the direction of the light (deviation δ), while a parallel-sided slab only shifts it sideways (no deviation).