first of all i am assuming that numbers are not supposed to be pairwise co prime so your solution need more work on m,n,k . You have to show what exact condition we need on k to get perfect solution out of it.Here I have different approach.
now take a2=3 a3=4 a4=12 and b3=13 and now we know that we have infinite pythagorean triples so we will take (a1,b1,b2) as a pythagorean triple. where a1^2=b1^2 + b2^2 wlog assume that b1>b2 so we take all pythagorean triples with b2>13 as condition.