How do I increase an APFS partition size?
While the volumes stored in a APFS container are random access, the container itself is not. An APFS container is stored in a GPT partition. These types are partitions are sequentially stored on a drive. It is possible to expand a GPT partition to occupy space immediately before or after the partition. However, an APFS container can only be expanded to occur space immediately after, but not before. So you have two problems. First the ~400 GB of space is not immediately adjacent to the partition holding the APFS container. The partition with identifier disk0s3 is between this space and the partition holding the APFS container. Second, the space is above the APFS container. So even if you were to remove disk0s3, you still could not add the space to the APFS container.

To summarize:


While the drive and APFS allow random access, the GPT scheme does not.
APFS can be only be expanded downwards or shrunk upwards.


If you wish to wipe the entire drive and create 1.4 TB APFS container followed by JHFS+ partition, then enter the following command.

diskutil partitiondisk disk0 2 gpt apfs MyAPFS 1400G jhfs+ MyJHFS+ R


The EFI partition will be created automatically. If the above command was executed on a 2 TB drive, then result would be the partitioning shown below.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *2.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         1.4 TB     disk0s2
   3:                  Apple_HFS MyJHFS+                 599.7 GB   disk0s3

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +1.4 TB     disk1
                                 Physical Store disk0s2
   1:                APFS Volume MyAPFS                  24.6 KB    disk1s1


The command diskutil listfilesystems produces the output shown below. From this output, one can determine that the jhfs+ used in the above command means Mac OS Extended (Journaled).

Marlin:~ davidanderson$ diskutil listfilesystems
Formattable file systems

These file system personalities can be used for erasing and partitioning.
When specifying a personality as a parameter to a verb, case is not considered.
Certain common aliases (also case-insensitive) are listed below as well.

-------------------------------------------------------------------------------
PERSONALITY                     USER VISIBLE NAME                               
-------------------------------------------------------------------------------
APFS                            APFS                                            
  (or) APFSI
Case-sensitive APFS             APFS (Case-sensitive)                           
ExFAT                           ExFAT                                           
Free Space                      Free Space                                      
  (or) FREE
MS-DOS                          MS-DOS (FAT)                                    
MS-DOS FAT12                    MS-DOS (FAT12)                                  
MS-DOS FAT16                    MS-DOS (FAT16)                                  
MS-DOS FAT32                    MS-DOS (FAT32)                                  
  (or) FAT32
HFS+                            Mac OS Extended                                 
Case-sensitive HFS+             Mac OS Extended (Case-sensitive)                
  (or) HFSX
Case-sensitive Journaled HFS+   Mac OS Extended (Case-sensitive, Journaled)     
  (or) JHFSX
Journaled HFS+                  Mac OS Extended (Journaled)                     
  (or) JHFS+
Marlin:~ davidanderson$