list manipulation – Creating a loop

I have just started using mathematica and I am completely new to "programming". So, I am a kind of noob in its purest form ..

I'm trying to turn one coordinate system into another. I'm using M1 as a kind of map to get the position of the elements I am looking for in the other matrix called CorrectionM. Mathematically, it's a simple coordinate transformation using "addition"

I have programmed a chain of operations starting with a simple 3-element list (Input1). This operation works correctly for a single list (the output of "CorrectedData" is correct), but I can not extend it on a list similar to a "List2" matrix (which is my main intention). I've tried to manipulate the entire list2, but the "FirstPosition" function can not be applied directly to a list.

Is there a function that imports each line of "List2" into my "Input1"? And is there a way to summarize again the output of the last operation (CorrectedData) in a list? I have tried using the Map, Table or Apply functions to create a kind of "loop" but I am absolutely unaware. 🙂

Thanks for the help!

Code:

(List2: {NumberCord, Coordinate X, Coordinate Y})

List2 = {{50, 100, 50}, {20, 100, 50}, {30, 100, 50}};

Entry1 = {50, 100, 50};

(Extract the first number of entries -> number of coordinate systems in M1)

NumberofCoord = Entry1[1]

50

(Identify the position of the coordinate system in the matrix M1)

IdentifyPosition = FirstPosition[M1, NumberofCoord]

{5, 10}

Correction =
CorrectionM[[IdentifyPosition[[IdentifyPosition[[IdentifyPosition[[IdentifyPosition[1], IdentifyPosition[[2]]]]

{9000, 5000}

(Addition Bildkoordinaten und Korrekturfaktors)

CorrectedData = {Input1[[2]], Entrance1[[3]]} + Correction

{9100, 5050}

Erase everything[“Global’*”]

enter the description of the image here