Indeed all the particles have the same amplitude of vibration in both transverse and longitudinal waves.

The exception being standing waves, which are a combination of waves. Standing waves produce nodes and anti-nodes, nodes being point of zero amplitude, and anti-nodes being points of maximum amplitude.

The equation of a standing wave is as follows (it is formed by adding the wave function of 2 compatible waves):

$A=\left[A_{o}\sin\left(kx-\phi\right)\right]\sin\left(ωt-\phi\right)$

The term $\left[A_{o}\sin\left(kx-\phi\right)\right]$ represents the variation of amplitude with distance.

The question asked in your book may very well be referring to standing waves

[![enter image description here][1]][1]

Here is a visualization of standing waves to help explain it better, the red dots are nodes, and the points of maximum amplitude are anti-nodes. The faded red and blue waves show the waves that combined to form the standing wave.

  [1]: https://i.sstatic.net/ICXk7.gif

In your book, sound waves have been included in the varying amplitude case due to the fact that sound waves are radial waves, i.e. the spread spherically and uniformly from a source. Now, this type of wave has an amplitude that varies with distance.

Using the inverse square law, we see that if the initial intensity of the sound was $I_{o}$, then at a distance *r*, it will reduce by a factor of $\frac{1}{r^{2}}$

Now, we have an equation that relates intensity to amplitude, which says that $I\ ∝\ A^{2}$. 

Hence, we can conclude that the amplitude varies as a function of r, and deceases as r increases.
This is what i believe your book was referring to.