SSC CHSL 17 Mar 2023 Shift 4 — Question 51 (Arithmetic)

Medium2023
The average age of Ram and Shyam is 28 years. If Rahim replaces Ram, then the average age will become 26 years. If Rahim replaces Shyam, then the average age will become 30 years. What are the respective ages of Ram, Shyam and Rahim?