The system of two rods will lie on the table as show in the figure
The center of first rod will lie exactly at the edge of first rod and then the center of mass of two combined rods will lie at the edge of the table.
So now the whole system will rest on the rod and it will not tipping off.
Since both rods are identical so we can say that the system will have its center of mass at the mid point on the line joining the two centers
So the value of x will be at mid point of line joining the two points on rod
So total length over the edge will be given as