Answer: (m,n,p)=(1,1,2).
Setting k=2024, m1=m/d and n1=n/d, the given identity becomes dk−2(dm1k+1+n1k)=pm1n1, where d is the greatest common divisor (m,n) of n and m. Put a=n1/b and c=d/b, where b denotes (d,n1). Then we get (cb)k−2(cm1k+1+akbk−1)=pm1a. Observe that cm1k+1+akbk−1 is greater than 1 and is relatively prime to m1a. Then (cb)k−2 is divisible by m1a and
m1a(cb)k−2(cm1k+1+akbk−1)=p(0.3)
which implies (cb)k−2=m1a. Since (m1,b)=1 and (a,c)=1 we must have a=bk−2 and m1=ck−2. Thus, it follows from (0.3) that ck2−k+1+bk2−k+1=p, hence p must be divisible by b+c since k2−k+1 is odd. Therefore p=c+b which gives us c+b=ck2−k+1+bk2−k+1. Hence we conclude that c=b=1 and so m=n=1,p=2.