Meeting point of two moving objects (non constant velocity) I have two objects, one placed at position 100 and the other at position 300.
The first object moves 7 positions every 4 seconds. The second object moves 8 positions every 6 seconds.
Note: at time "0" the 1st jump is already completed, for this example this means the positions at time 0 are 107 and 308.
The speeds are not constant as in 7 positions every 4 seconds doesn´t mean it moves 1.75 positions per second. Every 4 second the object jumps/teleports forward 7 positions. The answer can never contain decimal points.
I need to come up with a solution to find the meeting point of the two objects. In case of this example, the correct answer is position 940.
I can find the meeting point with constant speeds but this has got me stumped.
This is what I've tried:
Difference in positions: 200
Match times: 4 * 3 = 12 and 6 * 2 = 12
Use the same multipliers on jump distances: 7 * 3 = 21 and 8 * 2 = 16
21x - 16x = 200
5x = 200
x = 40
100 + 21 * 40 = 940
300 + 16 * 40 = 940
This works on some cases, but not on all of them.
For example:

*

*Starting positions: 10 and 5. Speeds 7 positions every 7 seconds, 8 positions every 6 seconds respectively. Meeting point: 45. The solution above doesn´t work for this.


*Starting positions: 1 and 15. Speeds 7 positions every second, 5 positions every second respectively. Meeting point: 50. The solution above works.
 A: I'll show you how to the example labeled $1$ where the solution method I suggested in a comment doesn't work.
Suppose the two people meet at position $p$ after the first person has taken $s$ steps, and the second person has taken $t$ steps.  We have $$7s+10=p=8t+5$$ so the first thing we need to do is to find what positive integers $s,t$ satisfy
$$7s+10=8t+5$$ or $$8t=7s+5\tag1$$
This is called a linear Diophantine equation, and I gather you haven't studied them yet.  Since we have one equation in two unknowns, we expect that there may be more than one solution. In fact, there are infinitely many.
To solve $(1)$ we need to find the integers $s$ so that $7s+5$ is divisible by $8$.  Let's divide $s$ by $8$, say $s = 7q+r$ where $0\leq r<8$.  Then $$7s+5=7(8q+r)+5 = 56q+7r+5$$  Of course $56q$ is divisible by $8$, so $7s+5$ is divisible by $8$ if and only if $7r+5$ is divisible by $8$.  It all depends on the remainder of $s$ on division by $8$.
We can check the possible remainders $0,1,\dots,7$ one by one to see which one work, and we find that only $r=5$ does.  Therefore,
$$
\begin{align}
s&= 8x+5\\
p&=7s+10=7(8x+5)+10=56x+45
\end{align}$$
The possible positions where the people meet are $$45, 101, 157, \dots$$  We can check them one after another to see whether the people meet there.  In this case, $45$ turns out to be the answer, and it's easy, but suppose the difference between the initial conditions had been greater, so that it took lots of steps to catch up.  Then checking one possibility after another could get arduous.  Let's look at a general approach.
We need to find a position that both people visit, where the times that they occupy the positions overlap.  Let's say that the process starts at time $t=0$.  To get to position $p=56x+45$, the first person advances $56x+35$ positions which takes $8x+5$ steps.  Since he takes the first step at time $0$ and takes one step every $7$ seconds, he arrives at $p$ at time $7(8x+4)$ and leaves at time $7(8x+5)$.  Similarly, the second person arrives at position $p$ at time $6(7x+4)$ and leaves at time $6(7x+5)$, so we need to find the value of $x$ for which the intervals $$(56x+28,56x+35)$$ and $$(42x+24, 42x+30)$$ overlap.
In this case, it's obvious that $x=0$ is the only possibility.  If the numbers were large, it might not be so obvious.  Then we'd say, in order for the intervals to overlap, the initial point of one must lie within the other.  That is, either $$42x+24<56x+28<42x+30$$ or $$56x+28<42x+24<56x+35$$  Only the first of these has a solution for a non-negative integer $x$.
If the step sizes are large, then solving an equation like $(1)$ by trial and error would be tedious or impractical.  Then you can use a a famous algorithm called the extended Euclidean algorithm to solve it, but I can't go into that here.
EDIT
On reflection, in the last part, I ignored the possibility that both arrive together, when neither inequality would have a solution.  The initial $<$ signs should be changed to $\leq$ signs.  I think we should exclude the case where one person arrives just as the other leaves, so the second $<$ should not be changed.
