Foundations
The rate of change of amount (concentration) of any given component is a differential equation.
$$ r_j = \frac{dC_j}{dt} $$
The empirical rate law expression for a reaction defines how reaction rate depends on concentrations in the reaction expression.
$$ r_j = \pm k_{rxn} \Pi\ C_j^{n_j} $$
Reversible reactions have forward and backward terms. Irreversible reactions have only forward terms. The reaction orders $n_j$ are the stoichiometric coefficients of the component.
For a system of $N$ components, we will have $N$ independent differential equations.
Specific Example
For component X in your system, you can obtain this expression.
$$ r_X = \frac{dC_X}{dt} = k_1 C_A C_S - k_2 C_X C_S $$
Summary
This gives first insight as to how to set up the problem. You will not need to consider the production rate of component Y. You will have three independent, first order, coupled differential equations. How this system is to be solved is entirely a different question of its own right. I recommend a numerical approach with graphical output. Two packages that take this approach are below.
KinSim
Kinetic Reaction Demo
Options using MatLab or Mathematica are likely posted on their sites as well.