Question 836111
set p = Peter's age
   f = Fiona's age
P is a square
So p is one of 1,4,9,16,25,36,49,64,81,100,121,144,....
that is 1^2,2^2 and so forth.
Since ( p + 3 ) is prime let's look at possible values for ( p + 3 )
1 + 3 = 4 so p cannot be 1
4 + 3 = 7.  Since 7 is prime 4 is a possibility
9 + 3 = 12 so p cannot be 9
16 + 3 = 19 so 16 is a possibility
25 + 3 = 28 so p cannot be 25
36 + 3 = 39 so since 39 is divisible by 3, p cannot be 36
49 + 3 = 52 so p cannot be 49
64 + 3 = 67. Since 67 is prime 64 is a possibility
100 + 3 = 103. Since 103 is prime, 100 is a possibility
121 + 3 = 124 so p cannot be 121
At this point we know p can be 4,16,64 or 100.
We can check larger numbers later if necessary.
Since p - 3 is prime let's check out 4,16,64 or 100
4-3 = 1 so 4 does not work
16-3 = 13 which is prime so 16 continues to be a condidate
64-3 = 61 which is prime so 64 continues to be a condidate
100-3 = 97 which is prime so 100 continues to be a condidate
At this point we know p is probably 16, 64 or 100.
We know (p + f) is a square so
(p + f) is one of 16,25,36,49,64,100,121,144,..
If p = 16 , f = 20 is possible since 16+20 = 36
16 + 49 = 65 , not a square
16 + 64 = 80 , not a square
16 + 100 = 116 , not a square
16 + 121 = 137 , not a square
Let's check further to see if 16 and 20 work.
We know (p-f) is a square so
20-16 = 4 and we are good on this requirement.
Three years from know each will be prime.
20+3 = 23 so this checks
16+3 = 19 so this works
Three years ago needs to be prime
20-3 = 17 so this checks
16-3 = 13 so this checks
We know that p = 16 and f = 20 works.
So Peter can be 16 and Fiona 20 and we meet all of the requirements.