The Supreme Court on Tuesday granted the Indian Railways authorities and Uttarakhand government eight weeks' time to work out a solution in relation to the rehabilitation of the people who were asked to vacate the encroachments from railway land in Banbhoolpura area of Haldwani.