I cannot get away from the impression that this topic is treated without clarity unlike the rest of the same book (I speculate it's a result of lack of full understanding hence lack of confidence?). But as a reader I cannot be very sure. I'm also conscious and cautious about the fact that English is not my first language. Do you also find the reference to "circuit" (underlined, especially the first one) very abrupt? (I would be surprised but still happy if you all say NO, but even this would be very helpful to me.)
You are perfectly right, the explanation is misleading. But the problem is rather subtle and I have seen many bad explanations.
Ampere's law is an integral version of a local law (Maxwell equation) : integral of B on a contour around a conductor is proportional to the current in the conductor. From this you can calculate the magnetic field only in a situation of infinite straight conductor where the cylindrical symmetry simplifies the problem. There shouldn't be any "l" in 2.52 if it is said to be a consequence of Ampere's law, period.
I also struggle to understand 2-51 -- how could the magnetic field strength at a point some distance away from the conductor dependent on the length of conductor(l)? Imagine a very long conductor the ends of which is very far away from the point of measurement. Will more length of the conductor add more magnetic field strength to the point (still proportional to the conductor length)?!
Actually 2.51 is the Biot-Savart law. This is also an integral law telling how to sum contributions from different portions of a circuit so that it is usually written as dB=const*I dl sin(theta)/r^2.
In the limit of very long conductor the contributions from the ends will progressively vanish because of sin(theta) which goes to zero, therefore B is NOT proportional to the conductor length.
The Biot-Savart law is ONLY correct (equivalent to Ampere law) if integrated over either an infinite or a closed loop conductor. Otherwise it would obviously violate the charge conservation.
But the funny thing is that an incomplete (finite conductor length) integration has a well defined physical meaning, this comes from the fact that combining Biot-Savart with the continuity equation (charge conservation) yields Ampere's law:
https://physics.stackexchange.com/questions/495625/derivation-of-amperes-law-from-biot-savartAs they point out, Biot-Savart "is inconsistent with the continuity equation. We don't know how to generalize Biot-Savart, but patching up the problem with the continuity equation in the simplest possible way yields the correct Ampere's law".
What does this means physically ? A simple interpretation is that integration of Biot-Savart over a finite length conductor will yield a magnetic field that would be measured if we put e.g. two charged spheres (acting as a charge source/sink) at both ends of the conductor.
The Ampere's law is recovered because we now have varying electric field from the spheres, this varying electric field gives a contribution to the total magnetic field which happens to compensate exactly for the missing part of the conductor, from the actual ends to infinity. Finally electromagnetism laws are very coherent and robust if we know how to interpret them correctly