Both passports (the valid and the expired one with the visa) should be from the same country.
When you arrive at the U.K. (airport) the Customs Immigration Officer will check your visa in the old passport and if s/he decides to admit you into the U.K they will stamp your new passport with an...