ffcat.spad line 645 [edit on github]
This package solves linear diophantine equations for Bivariate polynomials over finite fields
solveLinearPolynomialEquation([f1, ..., fn], g) (where the fi are relatively prime to each other) returns a list of ai such that g/prod or returns "failed" if no such list of fi = sum ai/fiai's exists.