Outputting prime numbers in given ranges
Before addressing the performance problem I would like to make some
general remarks:


You validate the input values (t, m, n), but invalid numbers are
simply ignored. For a programming challenge I would assume that the
input values are in the specific ranges. However, if you decide to
check the validity then an invalid input should produce an error message
or program exception.

Also the check is unnecessary complicated: m and n are passed to
functions checkM and checkN, but those functions also refer to
the class variables m and n directly. This could be simplified to

if (1 &lt;= m &amp;&amp; m &lt;= n &amp;&amp; n &lt;= 1000000000 &amp;&amp; n - m &lt;= 100000) { ... }


Even better, define and use constants for those limits.
The recursive function repeatReader is used to handle all test
cases (but only if there is more than one test case). This seems
unnecessary complicated to me, a simple loop would suffice.
The logic to get two integers from the input line is duplicated
in main and repeatReader.
Several variables are declared as static class variables, but
needed only locally in a function (such as m, n, beforeSeparate).
There is no need to store all ranges in an array first, you can
read each range and then produce the corresponding output.
Scanner.nextInt() can be used to read the input into integers 
directly.
In addPrimeNumbers you can print all found prime numbers directly,
without concatenating them to a string first.


So the overall structure could be simplified to

import java.util.Scanner;

class PrimeNumbers {

    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int numTests = sc.nextInt();
        for (int test = 1; test &lt;= numTests; test++) {
            int m = sc.nextInt();
            int n = sc.nextInt();
            printPrimesInRange(m, n);
            System.out.println();
        }
    }

    private static void printPrimesInRange(int low, int hi) {
        // Print prime numbers in the range low...hi
    }
}


Note that

       for (int num = j; num &gt;= i ; num--) {


in addPrimeNumbers should be

       for (int num = j; num &gt;= 1 ; num--) {


otherwise the result is not correct for ranges not starting at 1.

With respect to performance: Your function counts all divisors
of a number, but


one can stop the test if any non-trivial divisor has been found,
any non-prime number \$ n \$ has a divisor which is \$ \le \sqrt n \$ 


Therefore this

    private static boolean isPrime(int n) {
        if (n &lt; 2) {
            return false;
        }
        int limit = (int) Math.sqrt(n);
        for (int j = 2; j &lt;= limit; j++) {
            if (n % j == 0) {
                return false;
            }
        }
        return true;
    }

    private static void printPrimesInRange(int low, int hi) {
        for (int n = low; n &lt;= hi; ++n) {
            if (isPrime(n)) {
                System.out.println(n);
            }
        }
    }


would already improve the performance because the primality check
for each number \$ n \$ is reduced from \$ O(n) \$ to \$ O(\sqrt n) \$.

For the range 100000 200000 this reduced the time from 43 seconds
to approx 0.3 seconds on my 3.5 GHz Intel Core i5 iMac, measured with


$ time java PrimeNumbers &lt; input > output


and for the range 999900000 1000000000 I measured 0.7 seconds.

So this might be sufficiently fast to pass the challenge.
For even better performance, use sieving methods like the
(segmented) sieve of Eratosthenes (see for example https://www.geeksforgeeks.org/segmented-sieve/).