parted, and assuming the snippets you are showing are from the output of
lsblk, here is a minimal set of actions you can perform to accomplish what you are asking for:
parted as root, select the device you want to act upon:
(parted) select /dev/sdb
Create a MBR partition table (no particular reason for choosing this type; in
help mklabel for a list of available types):
(parted) mklabel msdos
Then, create the partitions:
(parted) unit MiB
(parted) mkpart primary 1 501
(parted) mkpart primary 501 1000
parted is instructed here to use the mebibyte as unit because that is the default for
lsblk. This way you can outright type the same numbers posted in your question.
The starting point of the first partition is arbitrarily at 1 MiB because 1) it cannot be at 0 and 2) 1 MiB is a relatively lazy but safe choice for alignment. A discussion on partition alignment seems out of scope here.
You can then check your changes with: