I don't knit socks (yet), but I'd cast on the same as the sock itself calls for, then knit the main pattern of the sock for however many rows it takes to reach about 5 inches high. Then measure how many stitches you get per inch, and how many rows per inch. Compare it to the given gauge of 25 sts per four inches, or if you like, 12.5 sts per two inches, or 6.25 sts per inch. If you don't get 25 sts per four inches on your swatch, change needles appropriately up or down in size until you get 25 sts per four inches. (Bigger needles give you less stitches, smaller needles give you more stitches.)
You don't give the row gauge they're asking for. It may be that you just knit until you hit the length you need.