Thomas works out for Pistons and Kings