On a ternary Diophantine problem with mixed powers of primes