If there are integers m and n such that
( 5 4 )m = ( 2 1 )n

then
log2 log5/4

is rational and 5m = 2n+2m but this is impossible as 2 and 5 are prime so there cannot be integer solutions of this equation.

Now suppose
( a b )m = ( c d )n

then am dn = bm cn and, as a and b are coprime, am divides cn and cn divides am so am = cn . Similarly bm = dn .

This implies that am and cn have the same prime factors. Write a= p1 u1 ... pk uk and c= p1 v1 ... pk vk and for all j we have muj = nvj so that
u1 v1 = u2 v2 =...= uk vk .

Similarly for b and d.

This is a very special relationship between a and c and also between b and d so in general this does not happen and there are no positive integers m,n such that
( a b )m = ( c d )n .

Conversely suppose a= p1 u1 ... pk uk and c= p1 v1 ... pk vk and
u1 v1 = u2 v2 =...= uk vk .

We call this common ratio n m then uj m= vj n for all j and am = bn .

Similarly if corresponding ratios of the powers of the prime factors of b and d are constant and also equal to n m then bm = dn giving
( a b )m = ( c d )n .