I'm sorry that my intuition/training for special relativity is not so good so this question might seems foolish.
In the figure (a) is depicted a set of particles which are in the rest in frame x'-t'. But in the frame x-t which is moving with a velocity -v relative to x'-t' frame, they seems to move, not in rest.
My question is following.
The length of the box occupied by the particles dx, in frame x-t, should be Lorentz contracted as dx=dx`/γ. And the text explains like that. But in the diagram dx is apparently longer than dx', and I cannot find a problem in the spacetime diagram. What's the matter?

A spacetime diagram on rotated graph paper can help you visualize the size of intervals in a spacetime diagram. The light-clock diamonds of various observers have equal areas (in accord with the Lorentz Transformation).

Similar to the setup in your figure (a), Alice is at rest and Bob is moving with velocity (say) (-3/5)c.
So, $\gamma=\frac{1}{\sqrt{1-v^2}}=5/4$ (which is equal to $OP/OQ$).

Alice carries a ladder that is $10$ units long (using her diamonds).
Bob measures that ladder to be only $8$ units long (using his diamonds) [in accord with $8=(10)/(5/4)$], despite what your Euclidean intuition tells you.

The light-clock diamonds encodes the idea that there is a hyperbola (the Minkowski analogue of Euclidean geometry's circle) with center at event $O$ marking "10 spacelike units from $O$".
Although Alice's radius vector $OX'$ of size 10 meets the worldline of the far end of her ladder, Bob's radius vector $OX$ of size 10 meets that worldline before his 10th unit.