(I'm still in high school and I haven't had a job interview yet, but here are my two cents)
These types of puzzles have an extremely poorly defined structure. As such, such puzzles would be closed as "too broad" on PSE. There could be tons of technically valid solutions, so with nothing obvious, it is difficult to pinpoint which solution is "most valid". You struggle to find logic in these puzzles, and that's probably because there is little logic at all. For example, a solution to the first problem could be to find some crappy function that maps two of the inner integers to the adjacent integer at a corner, e.g. f(5, 13) = 7, f(3, 5) = 2, f(3, 13) = ?
Obviously, this leads to an infinite number of solutions. As for the second puzzle... Just WHAT? There is literally zero logic to apply here. Do they want the sum of the outer numbers? Their product? Their f(x, y, z)??? Whose idea was this? The fact that someone can call this a "puzzle" is sickening. It's a waste of time, and I seriously doubt it will be asked at an event as serious as a job interview.
The kinds of puzzles given in interviews, to my knowledge, have a completely different style, such as "John puts 20 ants on the left end of a long stick, moving right in a straight line. Mary puts 47 ants at the right end, moving left. When two ants collide, they both turn around. When an ant reaches the left end, John takes it. When an ant reaches the right end, Mary takes it. How many ants does John get, and how many collisions are there?" Or, "You and 50 prisoners are given a chance for freedom. The warden will lock everyone in separate cells with no chance at communication, and at random will pick a prisoner every so often to go to a room with two levers. The prisoner will flip one and only one lever, then go back to their cell. At any point, a prisoner may claim that everyone has visited the lever room. If the prisoner is wrong, everyone dies. If he is right, everyone lives. The prisoners are given an hour to strategize. What's the plan?" etc. They have an obvious goal in mind, with no guessing, and after that it's pure thinking. Much more elegant than those crap "viral" number puzzles often appearing on the internet.