I would turn this problem into graph search in which vertices are "equivalent sets of equations" and edges are "valid operations" such as such as substitution, division and so on, which always ensure that all states are mathematically equivalent. A very simple example of a few states and edges (to requote from your question):
State 0:
Eq. 1: a = b + c;
Eq. 2: s = b / a;
Eq. 3: r = b / c.
Operation 0-->1:
Multiply Eq. 3 by c
State 1:
Eq. 1: a = b + c;
Eq. 2: s = b / a;
Eq. 3: rc = b.
Operation 0-->2:
Substitute Eq 1 into 2
State 2:
Eq. 1: a = b + c;
Eq. 2: s = b / (b+c);
Eq. 3: r = b / c.
Operation 2-->3:
Rearrange Eq 3 so B is on right hand side.
etc etc
Depending on how many operations you have, this does mean that the graph could be quite large, so you may not want to generate the entire graph (actually, the graph will be infinite if the number of operations allowed is unlimited). It's also possible that the graph will contain cycles, since there may be multiple ways to reach the same state.
You will have to think about how to develop data structures for representing the states and operations. Since this is a search problem, it will help to define what your "goal" states look like (e.g. states where s is defined in terms of r).
To search the graph, I recommend one of these approaches:
- Breadth-first search: this will find the shortest number of operations needed to reach any goal states
- Best-first search: if the graph is too large for breadth first, you may need to guide the search to the goal states using a heuristic, e.g. you could rate states by how few variables are needed on the LHS of equations or something like that -- some experimentation will be needed here.
The exact choice of search algorithm will depend on how big the graph is, which in turns depends on how many operations/edges you want.