Merge partitions with Macintosh HD
diskutil  erasevolume  "Free Space"  ""  /dev/disk0s4
diskutil  resizevolume  /dev/disk0s2  R


The first command will remove partition /dev/disk0s4.

The second command will move /dev/disk0s3 to the bottom of disk0 while resizing /dev/disk0s2 to maximum size.