Well, first off, let's list all the possible combination of ages (and their sum):
$1,1,36; 38$
$1,2,18; 21$
$1,3,12; 16$
$1,4,9; 14$
$1,6,6; 13$
$2,2,9; 13$
$2,3,6; 11$
$3,3,4; 10$
I'm not sure what to make of the building one, but note the specific wording in the third clue: "older". The only reason you would say "older" when referring to THREE people (you would typically use "oldest") means that two of them must be twins. So, you now have three possibilities left:
$1,1,36; 38$
$2,2,9; 13$
$3,3,4; 10$
I don't know how to use the building clue to pare the choices down to one.
That help?
EDIT: Apparently, "older" should be "oldest". In that case, the solution could be any of them but one. In addition, the missing piece is that if the person solving the puzzle knows the number of windows in the building but still cant figure it out, then the two possibilities are:
$1,6,6; 13$
$2,2,9; 13$
At this point, the remark about "oldest" rules out the first one and leaves only $2,2,9$ as the correct answer.
1 step) a. across should be a prime number, which digit sum (c. across) is a 1 digit number.
2 step) c. across should be an odd number, because b. down is a prime number and can't be divisible by 2.
3 step) from step 2 -> a. across should be a prime number, which digit sum (c. across) is odd number.
4 step) from 1 and 3 steps -> a. across first digit should be even, because second digit is always odd for their sum to be odd.
5 step) from 1 and 4 steps -> we get two numbers which satisfy the rules, it is 43 or 61. So in b. down we get 37 or 17.
6 step) a. down is a square of the sum of the digits of b. down, so from step 5 -> we get a. down is 100 or 64.
7 step) 100 doesn't fit to our rules, 64 does.
Answer:
6 1
4 7
Best Answer
In your equation, if you solve for $a$ you get:
$$a = \frac{\sqrt{M^2-60b^2}}{3} - 4b$$ If we're looking for integer solutions then this means that $M^2-60b^2$ must be a square. Also it must be divisible by $3$, so at least you only need search over (pseudo-)triples of the form: $$9x^2 + 60b^2 = M^2$$ Moreover you want $a$ to be positive so you require $x \ge 4b$. There is only one primitive triple with this property which yields $\{a,b,M\} = \{2,3,48\}$. Any multiple of this triple would also work ($\{4,6,96\}, \{6,9,144\}, \ldots$).