Five compounds R,T,W,X and Y form the following compounds: a basic hydride R.H, an acidic…