Are alkenes or alkynes reduced first with diimide?
Your given answer to the textbook question is seemingly correct. I said seemingly, because this reaction is not well understood to date, even though its first introduction was given at time as far as 1929 (Ref.1). The reaction was mostly hidden without getting attention in literature until to the middle of 20th century. This is mostly because the reactive species of the reaction, the unstable molecule, diimide ($\ce{HN=NH}$) was not well understood.

By 1960's, the unstable $\ce{HN=NH}$ was generated in a variety of ways such as oxydation of hydrazene (by $\ce{H2O2}$ or atmospheric $\ce{O2}$), or decarboxylation of azodecarboxylic acid, or thermal decomposition of p-toluenesulfonylhydrazene. It reacts with alkynes (e.g., diagram A below; Ref.2) and unhindered alkenes (e.g., diagram B below; Ref.3) to transfer two hydrogens in a cyclic process (diagram C below; Ref.4), resulting in a strictly cis reduction. This is the mildest way of performing such reductions. As shown in the diagram A below, one generally useful application of this reduction by diimide is it did not cleave the weak $\ce{C-I}$ bond during the reduction process. Most other reducing agents will cause competing or complete cleavage of the $\ce{C-I}$. The most important advantage in this case is in the conversion of iodoalkyne to vinyl iodide, it gives predominantly the cis-isomer. In addition, it is note worthy that this method of reduction with diimide does not lead to the cleavage of other sensitive functions such as $\ce{O-O}$ and $\ce{N-O}$ bonds.



To my understanding, the type of functions reduced by diimide are depend on the way it was generated. Besides, the rate determining step is always the rate of diimide generation. In general, trans-alkenes react more rapidly than cis-alkenes. During the mechanistic study of reaction, it was reported that diimide reduction of symmetrical multiple bonds proceeds readily. Those bonds included $\ce{C=C}$, $\ce{C#C}$,$\ce{N=N}$, and $\ce{O=O}$. On the other hand, more polar functions such as $\ce{C=O}$, $\ce{C#N}$,$\ce{C=N}$, and $\ce{O-N=O}$ are either very slowly reduced or not reduced at all (Ref.4).

The table 1 has given some uniques alkene substrates used in this process (Ref.5). In this research, 2-nitrobenzenesulfonylhydrazene has been used to generate diimide in situ.




  Abstract of Ref.5: A one-pot protocol for the formation of 2-nitrobenzenesulfonylhydrazide (NBSH) from commercial reagents and subsequent alkene reduction is presented. The transformation is operationally simple and generally efficient for effecting diimide alkene reductions. A range of 16 substrates have been reduced, highlighting the unique chemoselectivity of diimide as a reduction system.


A recent publication has shown that diimide can be generated by refluxing haydrazene in air (with solvent). The reduction of diimide generated by this method gives somewhat different results. For example, a norbornene derivative gives 100% conversion in Table 1. However, similar substrate used in Ref.6 has given only 42% yield (Entry 15; Ref.6). Further, a styrene derivative (cis-1-phenylpropene) gives 61% conversion in Table 1. Yet, styrene substrate used in Ref.6 (should be better since it is a terminal alkene) has given only 16% yield (Entry 17; Ref.6). Therefore, it is very convincing that the outcome is highly depend on the metheod of generating diimide,

Based on all, the result of the reaction in the question is uncertain.



References:


J. Hanus, J. Voříšek, "Action de L'hydrazine sur Quelques Acides Incomplets $\ce{C_nH_{2n-2}O_2, \ C_nH_{2n-4}O_2,\ C_nH_{2n-6}O_2}$," Collect. Czech. Chem. Commun. 1929, 1, 223-227 (https://doi.org/10.1135/cccc19290223).
Scott E. Denmark, Shyh-Ming Yang, “Total Synthesis of (+)-Brasilenyne. Application of an Intramolecular Silicon-Assisted Cross-Coupling Reaction,”  J. Am. Chem. Soc. 2004, 126(39), 12432-12440 (https://doi.org/10.1021/ja0466863).
James D. White, Rich G. Carter, Kurt F. Sundermann, Markus Wartmann, “Total Synthesis of Epothilone B, Epothilone D, and cis- and trans-9,10-Dehydroepothilone D,” : J. Am. Chem. Soc. 2001, 123(23), 5407-5413 (https://doi.org/10.1021/jo9710137).
E. E. van Tamelen, R. S. Dewey, M. F. Lease, W. H. Pirkle, “Selectivity and Mechanism of Diimide Reductions,” J. Am. Chem. Soc. 1961, 83(20), 4302-4302 (https://doi.org/10.1021/ja01481a057).
Barrie J. Marsh, David R. Carbery, “One-Pot o-Nitrobenzenesulfonylhydrazide (NBSH) Formation−Diimide Alkene Reduction Protocol,” J. Org. Chem. 2009, 74(8), 3186-3188 (https://doi.org/10.1021/jo900237y).
Hao Chen, Jianmin Wang, Xuechuan Hong, Hai-Bing Zhou, Chune Dong, "A simple and straightforward approach toward selective C=C bond reduction by hydrazine," Canadian Journal of Chemistry 2012, 90(9), 758-761 (https://doi.org/10.1139/v2012-057). Here is the available PDF of the article through Science Gate.