They aren't giving you the dimensions of all the distances that would add up to 4 because you don't need to know them. They aren't telling to how far it is from the pads to the corner of the package because you don't need to know that.
The process for designing the footprint goes something like this:
With a nice symmetric pattern like this, let's say the center of the part
Let's start with the vertical row of pads on the right.
- The dimensions of the pads are given: 0.40 by 0.25
- The x coordinate of the outside edge of the pads is given: (4.0/2)
- So the x coordinate of the center of that row of pads is the half their length from the outside edge: 2.0 - (0.40/2)
- There are an even number of pads, centered vertically around y = 0.
- The distance between the centers of the pads is given: 0.50
- So the y coordinate of pad just above the center is 0.50/2
- Place a pad at that location (1.8,0.25)
- Select the pad and use your tool's 'step and repeat' function to create the
rest of the pads in that row above and below it, on 0.50 centers
- Select the row and use the step and repeat to create the other vertical row.
These rows need to be offset by the width of the part minus the length of a pad, so 4.0-0.40.
- Repeat this process for the other two rows of pads.
- Add the center pad
- Check everything.
I will say this: making footprints is one time when it's really worthwhile to either use a pdf reader that allows you to mark up the drawing, or to print out the drawing and make notes with a pencil.
Note that this is assuming you want the pads on the footprint the same size as the ones on the part. This is not always the case.