How to set up these 2 sketches in 1 (for hc12)

i dont know the correct code to put those 2 parts together in the Uno to Receive data from Transmitter

Start from Serial input basics