The A*-Algorithm helps you find the optimal route from point A to B on a given graph plane. Let's say that I have the following problem where I have to go from Köln to Karlsruhe.
Without actually writing an algorithm, I tried to find the optimal route by finding the minimum distance from point A to B. I went from Köln to Frankfurt to Kaiserlautern to Ludwigshafen to Karlsruhe, where the total distance ends up being $912$ units. The quesion then asks that if a hypothetical algorithm was designed, which cities would it check? I think it should check all cities that're connected directly to the starting city (and then the cities that're on the optimal route), so Metz, Saarbrücken and Frankfurt. My answer is correct except for Metz which is not a city that the algorithm would "visit"?
So I have $3$ questions:
- Why would Metz not be correct?
- Is my distance value correct?
- What does the $h$-value tell us?
P.S. - I know this is basic theoretical CS stuff but I'm just in my first semester so please have mercy. :)

The A* algorithm uses actual distances between neighbors, along with estimated distances ($h$ values), to find the shortest path. If the estimates are good, A* is guaranteed to find the shortest path.
By hand, you found the shortest path between Köln to Karlsruhe. Given good estimates, A* is guaranteed to find that path (or another path of equal length). The length of your path is 430, which you can compute by adding up the lengths of the roads between cities. I believe you've added in $h$ values by mistake, but $h$ values do not affect length. They are used to guide search, but they are not included when you compute path lengths. (I explain $h$ values below.)
The main thing to know about A* is that it maintains a list of partial paths, and that it decides which path to consider (extend) next based on estimated total path length to the goal.
Estimated total path length is the length of the path so far, plus the estimated distance remaining to the goal. The $h$ values tell you the estimated distance from each city to the goal.
Initially, A* will compute estimated total path length from Köln to its neighbors to Karlsruhe. Those estimates are:
So naturally A* explores paths from Köln through Frankfurt, first. If the estimates are good, then paths with the smallest estimated total length will tend to have the smallest actual length when they reach the goal.
The reason A* never visits Metz is because the path to Köln-Metz never has the shortest estimated path length. You can see this by computing the estimated path lengths of the true shortest path:
Köln-Frankfurt, Köln-Frankfurt-Kaiserlautern, Köln-Frankfurt-Kaiserlautern-Ludwigshafen, Köln-Frankfurt-Kaiserlautern-Ludwigshafen-Karlsruhe
All of these have lower estimates than Köln-Metz, so the goal will be found before Köln-Metz will be visited.