Search father (x) of the number D(x) and measure time and memory consumed
PEP-8
Try to stick to PEP-8. So snake_case for variable and method names and a lot of other guidelines. Check any other Code Review Python post for tips from people who can explain this better than me.
Memory
Since you have 128MB of memory available, and a list of 1000 integers (l = list(range(1000)); sys.getsizeof(l) + sum(map(sys.getsizeof, l))) takes only 37kb on my system, I would not worry about clearing intermediate results.
Pre-calculate the primes to 1000
If the input number never goes beyond 1000, pre-calculating all the primes will be the fastest and most efficient. Here is method rwh_primes from this SO post adapted for Python 3:
def primes(n):
    # https://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188
    &quot;&quot;&quot; Returns  a list of primes &lt; n &quot;&quot;&quot;
    sieve = [True] * n
    for i in range(3, int(n ** 0.5) + 1, 2):
        if sieve[i]:
            sieve[i * i :: 2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
    return [2] + [i for i in range(3, n, 2) if sieve[i]]

This takes about 50µs on my PC.
prime_factors
You do some of unnecessary calls to set and list. I would implement this as a generator, and store it further upstream as a set:
def prime_factors(n):
    for factor in PRIMES:
        if factor &gt; n**.5:
            yield n
            return
        while not (n % factor): # n is divisible by factor
            yield factor
            n //= factor
            if n == 1:
                return

sum_digits
This one looks okay. You could use divmod, but that is a matter of taste.
offspring
No need for the intermediate DX:
def offspring(x):
    return x + sum(set(prime_factors(x))) + sum_digits(x)

Main guard
Keep the main logic behind a if __name__ == '__main__': guard.
eval
Instead of using eval, since you know it will be int, better use int(). eval can be dangerous, since it can execute arbitrary code. If you need to interpret a python literal, use ast.literal_eval.
Then you do something very inefficient by creating a dict, then take only the values, apply list, set and list again. Easiest would be to just use a set-comprehension:
all_offspring = {offspring(i) for i in range(1, 1001)}

This will include some numbers over 1000, but this extra memory should be negligible.
Test
You can spoof input on your system by something like
test_case = '''2
4
20'''
input = iter(test_case.split('\n')).__next__

main
if __name__ == '__main__':
    PRIMES = primes(1000)
    all_offspring = {offspring(i) for i in range(1, 1001)}
    t = int(input())
    for i in range(t):
        n = int(input())
        if n in all_offspring:
            print('YES')
        else:
            print('NO')

Timing
To time it you can use timeit module. There are enough posts on SO about this, and for memory usage.