Moving 1 foot costs 4 feet of movement
There are two separate processes at play here. Moving a distance and expending movement. These are clearly separate by features such as the Tiger's Pounce which requires that you move 10 feet (which would have to be 10 feet actually moved regardless of the terrain).
Wall of Sand states
A creature... must spend 3 feet of movement for every 1 foot it moves there.
while difficult terrain states
Every foot of movement in difficult terrain costs 1 extra foot.
The wording of difficult terrain does not imply that the movement resource is diminished (only 50% effective), only that 1 additional unit of that resource has to be spent to actually move 1 foot. As such, the 1 foot of movement through the wall of sand will similarly cost 1 extra unit of the movement resource.
Wall of sand by default changes the effective value of movement by making it equal 3 units so adding 1 from the difficult terrain will bring it to 4.