The charge on the object X is negative.
Because we know that opposite charges attract each , be it positive r negative.
But same charges repel each other. i.e. a positive will always repel a positive charge and a negative will always repel a negative charge see figure for more clarification