Question 836111
NOTE: I am giving you the best I could do. I just try to help here. I expect that one of those 12-year old math geniuses from the forum at the artofproblemsolving website could give you a much shorter, smarter answer.
 
How do we figure Peter's age?
He said it is a square number.
There are few square numbers that can be Peter's age
Just considering that it is a square number, it could be
{{{2^2=4}}} (if Peter is a really precocious kid),
{{{3^2=9}}} , {{{4^2=16}}} ,  {{{5^2=25}}} , {{{6^2=36}}} ,
{{{7^2=49}}} , {{{8^2=64}}} , {{{9^2=81}}} ,
and (if Peter and Fiona were lucky enough to live to such old ages)
{{{10^2=100}}} or {{{11^2=121}}} .
 
Peter said that in 3 years both of their ages would be prime numbers.
Fiona said that 3 years ago both of their ages were prime numbers.
That eliminates many of the possible ages for Peter listed above.
It must be even, and not a multiple of 3.
All the odd squares turn into even numbers (not prime) when you add and subtract 3.
All the multiples of 3 yield other multiples of 3 (not prime) when you add and subtract 3.
That eliminates
{{{3^2=9}}} , {{{5^2=25}}} , {{{6^2=36}}} ,
{{{7^2=49}}} , {{{9^2=81}}} and {{{11^2=121}}} .
Also,
{{{4-3=1}}} is not a prime number so Peter cannot be 4.
 
We are left with 3 possible ages for Peter.
He can be 16, or 64, or 100.
{{{4^2=16}}} is still a possibility because {{{16-3=13}}} and {{{16+3=19}}} are both primes.
{{{8^2=64}}} is still a possibility because {{{64-3=61}}} and {{{64+3=67}}} are both primes.
{{{10^2=100}}} is still a possibility because {{{100-3=97}}} and {{{100+3=103}}} are both primes.
 
If Peter is 16, or 64, or 100, how old could Fiona be?
Her age was a prime number 3 years ago, and will be a prime number in 3 years time.
Fiona has to be older than Peter, too.

We start from a list of prime numbers.
You can find a list of small prime numbers online, or in a book, or you can easily figure it out yourself.
The prime numbers that could be Fiona's age 3 years ago are:
17,23,29,31,37,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113.
(The prime numbers 2, 3, 5, 7, 11, and 13 are eliminated because they would not make Fiona older than 16, which is the youngest Peter could be, and the next prime, 127, makes Fiona too old).
 
If Fiona was 17 three years ago, she would be {{{17+3=20}}} now, and {{{20+3=23}}} in 3 years time.
Since 23 is a prime number that works.
Could Peter be 16 and Fiona 20?
 
Fiona said "the sum of our ages and the difference of our ages also give squared numbers".
Peter could be 16 and Fiona 20 if the sum and difference of those numbers are squares.
{{{16+20=36=6^2}}} and {{{20-16=4=2^2}}} are squares.
Peter could be {{{highlight(16)}}} and Fiona could be {{{highlight(20)}}}
That was a lot of work, but we have found a solution, and that is probably all that was expected.

 
Are there more solutions?
It takes more work (and a few assumptions) to answer that question.
Just like we found for Peter's age above, we realize that Fiona's age must be even so that it could be prime 3 years ago and 3 years from now.
Then, the difference in ages is an even square, so Fiona must be 4, 16, 36, 64, or 100 years older than Peter.
Also, I expect Fiona to be human, so I expect her to be at most 125 years old.
If Peter is 16, that would make Fiona
{{{16+4=20}}} (as we already found),
{{{16+16=32}}} , {{{16+36=52}}} , {{{16+64=80}}} , or {{{16+100=116}}} .
If Peter were 64, Fiona could be
{{{64+4=68}}} , {{{64+16=80}}} , or {{{64+36=100}}} .
If Peter were 100, Fiona could be
{{{100+4=104}}} , or {{{100+16=116}}} .
We know that Fiona's age was a prime number 3 years ago, and will be a prime number in 3 years time.
Does any of the new possible Fiona's ages calculated above
(32, 52, 68, 80, 100, 104, and 116) satisfy that requirement.
We work from a list of primes greater than 17 now:
23,29,31,37,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127.
{{{32+3=35=5*7}}} is not prime, so Fiona cannot be 32.
{{{52+3=55=5*11}}} is not prime, so Fiona cannot be 52.
{{{68-3=65=5*13}}} is not prime, so Fiona cannot be 68.
{{{80-3=77=11*7}}} is not prime, so Fiona cannot be 80.
{{{116+3=119=17*7}}} is not prime, so Fiona cannot be 116.
However, with Peter being {{{highlight(64)}}} , Fiona could be {{{highlight(100)}}} ,
because {{{100+3=103}}} and {{{100-3=97}}} are primes.
Also, with Peter being {{{highlight(100)}}} , Fiona could be {{{highlight(104)}}} ,
because {{{104+3=107}}} and {{{104-3=101}}} are primes.
Your teacher may think that is too old to reason and remember math.
There is also the problematic issue of the {{{100-64=36}}} years of difference in ages between a 100-year old Fiona and a 64-year old Peter. Although there are records of women giving birth well past age 50, and even before age 10, it would be very unlikely for siblings to have been born from the same mother 36 years apart.
I still want to believe in the plausibility of those answer, and I want to believe that 100 years from now it will not seem far-fetched at all.