Let rod is placed along x -axis. Mass of element PQ of length dx situated at x=x is
dm=λdx=(2+x)dx
The CM of the element has coordinates ( x , 0, 0).
Therefore, x -coordinates of CM of the rod will be xCM=∫03dm∫03xdm =∫03(2+x)dx∫03x(2+x)dx =∫03(2+x)dx∫03(2x+x2)dx =[2x+2x2]03[22x2+3x3]03 =[2×3+2(3)2][(3)2+3(3)3]=6+9/29+9 =2118×2=712 m