I agree with @Vince, it would be futile to attempt to convert the code backwards to such an old version of ArcMap. The modern arcpy module never existed then it use to be a gp object which you can find out about at Geoprocessor programming model. It would be a major rewrite to make it compatible. Also the language python has evolved so what you have used in ...
It is unclear what you want the output to look like, anything is possible. For example to export to one excel file with three sheets you can use arcpy, numpy and pandas python libraries. Pandas require ArcGIS version >=10.4 or you need to install pandas manually (python -m pip install pandas) Execute in python window:
import pandas as pd
Use the Sample raster values or Add Raster Values to Points tool to extract raster values:
Make sure each line has a unique attribute, eg "Line_ID".
Convert the lines into points
Use the Extract vertices tool if the vertices are frequent enough, or
Use the Points along geometry tool if you want more frequent/evenly spaced sampling points
Use the Sample ...
Download the QPackage Plugin.
When you run this you can select which layers you want saved and it will export them all as shapefiles.
The opposite of this is the Package Layers processing tool which saves everything off as a geopackage.
It looks like the scale is set to a high value that makes the view to look smaller. You need to adjust the scale to a smaller value to zoom in to the desired location. Also, you can fix the scale in order to fix the view of the layout to prevent it from being changed.
To do that:
Go to the scale in the layout
Click on Data defined override button
Okay I figured it out, I think the image was too large because I didn't define a region to export, so it cut away a part. I just had to draw a square incorporating my whole region of interest and add it to the export command:
description: 'Landcover Agriculture in ROI',