Extend main APFS partition fails with "target disk is too small for this operation"
The free space resides after disk0s3. The command you issued can not reclaim the free space back into disk0s2, because there little or no free space between disk0s2 and disk0s3. To reclaim approximately 25 GB of free space back to disk0s2, you would need to execute the following procedure.


Remove the files from disk0s3.
Delete disk disk0s3. You can use the command given below.

sudo diskutil  eraseVolume free none disk0s3

Add the approximately 125 GB of free space to disk0s2. You can use the command given below.

 sudo diskutil apfs resizeContainer disk0s2 0



Basically, it come down to this. If the files on disk0s3 are important, then you are going to need an external drive to temporarily store them. Once all the space has been returned to disk0s2, you can either create a new disk0s3 or create another APFS volume on disk0s2. Finally, restore the files from the external drive.