Hi there!
In order for the ratio to be the same, the transformations between the initial pancake recipe and the second recipe need to be the same from flour to flour and from milk to milk.
4 cups of flour was divided by 2 in order to become 2 cups of flour in the second recipe.
3 cups of milk was divided by 2 in order to become 1.5 cups of milk in the second recipe.
Since both milk and flour mesures went throug the same transformation (divided by 2) from recipe one to recipe two, you can then say that the ration is the same.
There you go! I really hope this helped, if there's anything just let me know! :)