Reaction of aldoxime and a ketoxime with acetic anhydride
This might sound obvious, but since the reagent and the reaction conditions are identical, the reason for the different outcome of the reactions must be related to the starting materials.

In the case of the aldoxime, the carbon atom of the former $\ce{CHO}$ group still bears a hydrogen atom. 


   Together with the $\ce{OH}$ group on the adjacent nitrogen atom, this allows (formally) for the elimination of water from the aldoxime under suitable conditions. High temperatures and the presence of a dehydrating agent facilitate exactly that.


The formation of a nitile from an aldoxime in boiling acetic anhydride is (formally) a dehydration reaction.

For obvious reacons, this pathway is not possible in the case of the ketoxime.

What is the role of acetic anhydride here?

I mentioned that the formation of nitriles from aldoximes is formally a dehydration. In reality, however, it is more likely that acetic anhydride actually reacts with both oximes.


    


Both the aldoxime and the ketoxime are 


   acylated. For the ketoxime (R' = alkyl), the story ends here. In the case of the aldoxime (R' = H), a subsequent elimination (of acetic acid) eventually furnishes the nitrile.