The manipulation started since the moment he paid off some Wayne accountant to block payments to his crippled employee, so it was several months at the least. Clark probably much later, perhaps after his access of the ship data. But really, people keep asking me how could Lex know. With his interest and smarts and resources, it seems pretty likely. It is quite difficult Bruce could operate for years without leaving a trail someone determined could find. Even Diana was found in these days of data mining and surveilance. Nolan addressed it well in his movies. Gordon did NOT want to know, and the accountant guy did not dare speak.