Two switch boxes wiring
The only thing wrong with it is you are supposed to have staples within 6 inches of the wires coming out of the box. An inspector might catch it but I personally wouldn’t worry about it. You could put a flat 2X4 (14.5” long) between the boxes to nail the wires to if you wanted.