So I can try
sudo ddrescue --size 350GB /dev/sda /dev/sdb /home/user/Desktop/mapfile.txt
And that would copy the MBR, the first partition and just the beginning of the second partition. Then I could use something like gparted or similar tool to delete the part of the second partition and enlarge the first partition to fill the entire 500 GB of the SSD. Correct?
Yes.
But since there are no problems now you can drop the mapfile.
You can also try something fancy, since as you know, Linux is a nerd thing.
Generally syntax between options like -s and --size are different, but it's not stone carved.
Usually '--' and '=' are friends.
sudo touch /home/user/Desktop/1st_blk.img
sudo ddrescue -s 512 /dev/sdb /home/user/Desktop/1st_blk.img
sudo hexdump --canonical /home/user/Desktop/1st_blk.img > /home/user/Desktop/1st_blk.txt
There's your new MBR, it may have many copies.
sudo touch /home/user/Desktop/some_blocks.img
sudo ddrescue -s 4096 /dev/sdb /home/user/Desktop/some_blocks.img
Then the fancy part.
sudo ddrescue -o 462 --size=16 /dev/zero /dev/sdb
Now you have cleared the second partition table, or that's at least my impression.
Not very canonical way of ddrescue, but hey, it's a nerd thing.