I believe this game is an impartial game since the set of allowable moves depends on the position of the game and not on which of the two players is moving.
So SG theorem could also be used to solve this problem but we could not simply XOR sub-games' SG values to get the SG value for current one. For this problem, the position of the game is relevant to both desired total and the unchosen integers. So we must consider which integers are not used.
Like 3-Nim game for example, the winning option is always ensure you move from a game position of a non-zero SG-value(N position) to positions where SG-value equals 0(P position). So the key to this problem is to determine if the start position is a N-position.
Why (10, 40) is false? The answer is this problem assumes the opponent plays smart.
If the first player choose 10, the second player has (9, 30).
first player moves from P-position to N-position.
If the second player chooses 1, the first has (2-9, 29), the first can win.
The opponent here does not plays smart, he/she moves within N-positions. (2-9, 29) is a N-position still. You assume the opponent will make some stupid moves losing winning positions.
If the opponent plays smart, he/she should move from (9, 30) to some followers in P-position .