There are two issues I see in your program:
1. When you do the subtraction, sometimes (about 1/2 the time) the difference will be negative. Thus your test for >= 8597 rejects those negative numbers, giving you a one-tailed test. To get a two-tailed test, you must take the absolute value of the differences before comparing. When you do, the result doubles to about p = 0.23, as you can see with this modified program:
COPY(74734 70396 77854 55009 69342) a
COPY(69213 52527 . . .) b
CONCAT a b c
REPEAT 15000
SAMPLE 5 c d
SAMPLE 5 c e
MEAN d dd
MEAN e ee
SUBTRACT dd ee f
SCORE f scrboard
END
ABS scrboard scrboardAbs '<=== Compute Absolute values
COUNT scrboardAbs >= 8597 k
DIVIDE k 15000 prob
PRINT prob
2. The second issue is to decide why you have three NaNs in the second sample. There is no need for the two sample sizes to be equal unless your real sample sizes were equal. If you are using NaNs just to make the sample sizes equal because they were equal in the "battery life" example, then that would be incorrect. From your description of the problem, I would guess that perhaps sample "b" should exclude the NaNs and be of size two. Then "e" should be of size 2 also. That would lead to a program like this one, which raises the p to about 0.25:
COPY(74734 70396 77854 55009 69342) a
COPY(69213 52527) b '<== No NaNs, sample size = 2
CONCAT a b c
REPEAT 15000
SAMPLE 5 c d
SAMPLE 2 c e '<== Sample size = 2
MEAN d dd
MEAN e ee
SUBTRACT dd ee f
SCORE f scrboard
END
ABS scrboard scrboardAbs '<=== Compute Absolute values
COUNT scrboardAbs >= 8597 k
DIVIDE k 15000 prob
PRINT prob