Answer: 256 seconds.
Let's get the gist of the question first, breaking it down bit by bit.
Every host in an IPV4 network has a 1−second resolution real-time clock with battery backup.
It tells that hosts have a cycle of 1 sec each and the "battery backup" part is given that so that it is assumed that there is no concept of the clock going off before the sequences wrap. (Quite irrelevant actually!)
Each host needs to generate up to 1000 unique identifiers per second.
This pertains to the unique ID field of the IPv4 packet which is used to identify a packet over the whole global internet.
So, this means that a host on the internet has the capability of creating 1000 such nos. and due to that each host over the internet has the capability of sending a max of 1000 packets per second.
Design a 50−bit globally unique ID for this purpose.
Now, these nos. need be designed in such a way that they are unique throughout the world, i.e. there may be chances that all the hosts over the internet are sending out packets simultaneously and it may create confusion if all are not working in tandem with each other.
And it's assumed that this ID being generated ( by all the hosts simultaneously, in the worst case) is 50 bit long.
So, they are asking that is such a scenario where all hosts work together, how long will it take for them to consume all the nos. and wrap around back to 0.
Now, the calculation part.
Total hosts present globally in IPv4 = $2^{32}$
In 1 sec, each host generates = 1000 IDs
In 1 sec, $2^{32}$ host genetate = $2^{32} \times 1000$
= $2^{32} \times 2^{10}$ (approximating 1000 as 1024 to make calculations easy)
= $2^{42}$
Nos. of possible IDs with 50 bits= $2^{50}$
Time to generate 1 ID = $\frac{1}{2^{42}}$ sec
Time to generate $2^{50}$ IDs = $\frac{2^{50}}{2^{42}}$
= 256 Seconds.