Substituting 'In doing so' for 'In this way' gives pretty much the same meaning as your quoted text. After Kathy finished with the hose, she put it down. The fact that she did that makes it near where she will use it next time.
Substituting 'in such a way that' changes it slightly to put more emphasis on the method Kathy employed to set down the hose. Perhaps she coiled it or moved it out of the way of anything (such as a car) that might be placed on top of it. To make that change, however you would need to join it to the previous sentence ie:
' ... and set down the hose in such a way that the hose would be ...'
As Tiercelet says, the passage in its current form is somewhat awkward, but not incorrectly so. Substituting 'In doing so' would reduce that awkwardness.
At the literal level, to do X with regard to Y, simply means take [due] notice of Y, with the strong implication that this affects how you do X, to at least some extent (you regard, look at, consider Y before deciding how to do X).
On the other hand, doing it according to Y explicitly states that your decision/action is in accordance, agreement, compliance with Y.
Consider a judge about to pass sentence on a child-molester, where the victim's parents have publicly called for the accused to be hanged...
1: Sentence will be passed with regard to the wishes of the victim's parents.
2: Sentence will be passed according to the wishes of the victim's parents.
In some countries it's possible the judge could say either of those, then sentence the accused to death by hanging. But in Britain (where we don't have the death penalty), #2 wouldn't really be a valid statement, since X (the judge) can't abide by the requirements of Y (the parents). If the British judge made the first statement, it would simply mean he took the parents' view into account (and almost certainly passed a more severe sentence that he might otherwise have done).
Turning to OP's three examples...
A: Since obviously there's no "official" rule book setting out exactly how kids should be treated at each different age, we can only interpret according to loosely (i.e. - the same as with regard to).
B: I think assigning a value to a variable X with regard to Y is slightly unusual phrasing, because I usually think of program code as following exact rules, not making judgements. If Y is the only thing affecting the assigned value, I'd say according to Y, but if other factors may also be involved I might say taking Y into account.
C: With building regulations, you normally comply exactly, so you act according to the rules. If you only do the work with regard to the rules, that might imply you're prepared to cut a few corners.
Best Answer
In this regard and in this respect refer back to an idea expressed in the previous statement.
Consider your example:
The second sentence can be paraphrased:
Decision makers should do something about that.
where "that" refers to the shortage of skilled labor in that city.
Or this example:
The second sentence could be paraphrased:
... in terms of speed, it is one of the worst places to use the internet.
or
when the criterion is speed, it is one of the worst places to use the internet.
"in this respect" refers to the slowness that is mentioned in the preceding clause.