Text this: Multiwavelength Sun-as-a-star Analysis of the M8.7 Flare on 2022 October 2 Using Hα and EUV Spectra Taken by SMART/SDDI and SDO/EVE