Your reasoning is sound, and your answer is correct. You could also have argued as follows, starting with your first observation. There are, as you say, $\binom85\binom{10}5$ ways to choose $5$ boys and $5$ girls. Now line up the boys. There are $5$ ways to pick a teammate for the first boy in line, $4$ ways to pick a teammate for the second boy in line, and so on, so there are $5!$ ways to match up the boys and the girls. That gives you a total of $\binom85\binom{10}55!=1\,693\,440$ different ways to form $5$ teams, each consisting of a boy and a girl.
My Calculation :
Consider $7^2$ :
When $X$ or $Y$ or $Z$ have $7^2$ , then LCM will have $7^2$ , Else LCM will not have $7^2$.
Number of ways to include (or not include) $7^0,7^1,7^2$ will be $3 \times 3 \times 3 = 27$ , while number of ways to include $7^0,7^1$ (& not include $7^2$) is $2 \times 2 \times 2 = 8$ , Hence the ways we want are $27 - 8 = 19$
Consider $17^2$ :
When $X$ or $Y$ or $Z$ have $17^2$ , then LCM will have $17^2$ , Else LCM will not have $17^2$.
Number of ways to include (or not include) $17^0,17^1,17^2$ will be $3 \times 3 \times 3 = 27$ , while number of ways to include $17^0,17^1$ (& not include $17^2$) is $2 \times 2 \times 2 = 8$ , Hence the ways we want are $27 - 8 = 19$
Total ways will be $19 \times 19 = 361$
Analysing OP Calculation :
Case 1 is Correct , though 1A & 1B can be combined like this :
$119^2,x,y$ where $x$ & $y$ have 8 ways , while we can order that in $3$ ways : $8 \times 8 \times 3 = 64 \times 3 = 192$
That matches OP way $168 + 24 = 192$
Case 2 is not Correct.
It is counting $7^2 , 17^2 , x$
It is missing Eg:
$7^2 \times 17 , 17^2 , x$
$7^2 , 17^2 \times 7 , x$
$7^2 \times 17 , 17^2 \times 7 , x$
UPDATE [ DUE TO OP QUERY ] :
Let $A=7^0,B=7^1,C=7^2$.
We can make the numbers $X,Y,Z$ by including these numbers 3 times to $X,Y,Z$ like this : "AAA or AAB or AAC or ABA or CAB or CBA , ETC"
With that , how many ways ? $3 \times 3 \times 3 = 27$ ways.
In that , we always want C to be there , otherwise LCM will not have $C=7^2$.
Hence , we count ways where C is not there & remove those unwanted ways.
"AAA , AAB , ABA , ABB , BAA , BAB , BBA , BBB"
Without C , how many ways we have ? $2 \times 2 \times 2 = 8$ ways.
Hence , wanted ways are $27 - 8 = 19$ with $7$
Likewise , wanted ways are $27 - 8 = 19$ with $17$
Total ways are $19 \times 19 = 361$
This is Correct Method !
Best Answer
Your approach seems alright but the way you are counting, you will have many duplicates and end up overcounting. We can count each case separately and add.
Let's take $\displaystyle 2^r$ first
Case 1 - two of them have power of $r$ and other two have power of $0 \leq p \lt r$.
Number of ways = ${4 \choose 2} \times r \times r$
Case 2 - three of them have power of $r$ and one has power of $0 \leq p \lt r$.
Number of ways = ${4 \choose 1} \times r$
Case 3 - all of them have power of $r$ for $2$. There is only $1$ way.
That gives total number of ways $ = 6r^2 + 4r + 1$
We similarly find for $s$ and then multiply for all possible quadruples.