If I have the following equation $$2x+3y = 5$$ I know all the integer solutions is $$x = 1+3n$$ $$y = 1-2n$$ $$n \in \Bbb Z$$ since I can just plug them in $$2(1+3n)+3(1-2n) = 5+6n-6n = 5$$
but I don't know how to derive the answer from the equation... also is there a name for algorithms to solve these integer function?
It has solution because $1=\text{gcd}(2,3)\mid 5$.
Let $(x_0, y_0)$ any solution of $2x+3y=5$ i.e. for example $x_0=y_0=1$. Let $(x,y)$ any other solution i.e. $2x+3y=5$. Subtracting we get: $2(x-1)=3(1-y)$. Hence $1-y=2t$ and $x-1=3t.$
Then any general solution can be find by generating formula: $$(3t+1, 1-2t), \quad t\in \mathbb{Z}.$$