If you'd like to see the functional diagram of what's going on, here's what you've got.
You can see where there's a whopper of a problem getting neutral at the switches.
Fortunately, you have switches which UL has approved to use ground as their power return. (owing to very particular design features therein).
To make this less mind-numbing, I advise buying a 5-pack of colored electrical tape and spiraling tape down the wires to re-color them by their function. Trust me, 3-way boxes are a maze, and you'll thank me later, boy howdy! When re-marking wires, always re-mark both ends of the wire exactly the same, and do it at the same time.
To adapt to these particular Legrand switches, I would
- On the "first switch to lamp" cable, re-mark WHITE to BLACK - this is a Code requirement and is mandatory.
- On the "first switch to lamp" cable, re-mark BLACK to RED - this is "Switched-Hot". Why not shortcut and mark white to red? Code forbids it. Reasonably: markers do fall off sometimes
- On the "between switches" cable, re-mark RED to YELLOW. This will be a data/signal cable, call it a "traveler" if you want, but there's only 1 of them due to smart switch magic.
- On the "between switches" cable, you will no longer use white for anything. Cap it off and coil it into the back of the box.
On the far box, the RED wire from the switch won't be used for anything. Cap it off.
On both boxes, the BLUE-WHITE and GREEN wires from the switch go to GROUND, per the instructions. NEC 110.3(B) requires that you follow the instructions, so it goes without saying that you read them :)
Other than that, everything should match up by its (assigned) color.