Solving a practical problem involving square of root of a number
You don't usually need to import java.lang, as it is built in, but maybe this is a special case. Either way, It's best to only import the classes you need. Regardless, java.io, and java.util are unused.

Did you import java.io for exceptions? In general's, it's preferable to throw a specific Exception, this alone doesn't really say much. As it is I think it's entirely unnecessary, and wonder why you're throwing any exception in the first place.

You don't need to break when you reach the sum, your while loops condition is already checking if sum reaches 411.

411 is a magic number. Looking at the code alone in the future it would serve you to instantiate the value in a final field.

In java it's conventional for variables and methods to be camelCase, so as an example, in your code firstpage should be firstPage and squareofroot should be squareOfRoot. Additionally, class names are PascalCase, so your class ADG would be Adg (Though I'd pick a better class name), doesn't hurt to be as descriptive as possible. I'd wager if you stepped back for a few months and just saw a file named ADG you'd wonder what it is. Try to keep these standards in mind going forward, they will help keep your code readable not only to yourself but anyone else you present it to.

Lastly, you don't really answer the question. The challenge asks


  How many pages did she read on each day?`


Answering that would be trivial with your code, you actually went one further and found out different ways she could have finished the book using her method.

Suggested Implementation:

import java.util.Map;
import java.util.LinkedHashMap;

public class Test {
    public static void main(String[] args) {
        final int pageTotal = 411;
        final int daysRequired = 6;
        Map&lt;Integer, Integer&gt; pagesReadPerDay = new LinkedHashMap&lt;&gt;();

        for (int firstPage = 1; firstPage &lt;= pageTotal; firstPage++) {
            int sum = firstPage;
            int day = 1;

            while (sum &lt;= pageTotal) {
                sum += squareSumDigit(sum);
                day++;

                if (sum == pageTotal &amp;&amp; day == daysRequired) {
                    int pagesRead = firstPage;
                    int currentPage = pagesRead;

                    for (int onDay = 1; onDay &lt;= daysRequired; onDay++) {
                        pagesReadPerDay.put(onDay, pagesRead);
                        pagesRead = squareSumDigit(currentPage);
                        currentPage += pagesRead;
                    }
                }
            }
        }

        for (Map.Entry&lt;Integer, Integer&gt; entry : pagesReadPerDay.entrySet()){
            System.out.println(
                "Day: " + entry.getKey() + 
                ", Pages Read: " + entry.getValue() + "."
            );
        }
    }

    public static int squareSumDigit(int num) {
        int sum = 0;

        while (num &gt; 0) {
            sum += num % 10;
            num /= 10;
        }

        return sum * sum;
    }
}


Output:


  Day: 1, Pages Read: 61.
  Day: 2, Pages Read: 49.
  Day: 3, Pages Read: 4.
  Day: 4, Pages Read: 36.
  Day: 5, Pages Read: 36.
  Day: 6, Pages Read: 225.