Aslam said to him, “The machine was working yesterday.”
Explanation
In indirect speech, "was working" changes to "had been working," and "yesterday" changes to "the previous day."
The correct reporting verb "told" is used instead of "asked" for a statement.