Part of the difficulty is that there are different requirements based on the rank, merit badge, or award:
For Second Class #3b., the Scout has to take a 5-mile hike while “Using a compass and map together”.
For Hiking merit badge requirement #4, Scouts also have to “Prepare a written hike plan before each hike and share it with your Scoutmaster or a designee.”
As @SteveCagigas said, the Hiking merit badge also specifies that the hikes used for the Hiking merit badge cannot be used to fulfill requirements for other merit badges (Camping, Backpacking, etc.).
Meanwhile, the National Outdoor Badge for Hiking includes hiking, backpacking, snowshoeing, or cross country skiing as long as those miles are completed while “under the auspices of the Boy Scouts of America”.
The World Conservation Award specifies that “Requirements for this award must be completed in addition to any similar requirements completed for rank.” So, a Scout would not be able to double count conservation service hours towards a rank and this award.