A positively charged rod X is brought near an uncharged metal sphere Y and is…