The Duke and Duchess of Cambridge took turns shearing sheep during a visit to a farm in northwest England.