Inline searc and replace inside file

Hello,
I have a text file that i want to redirect into a new file , searching and replacing certain string during the opertaion.
This should be done using shell script , so it should not be interactive.
The script should get four parameters :
source file
target file
source string
target string

For example :

source file = a.txt
target file = b.txt
source string = apple
target string = banana

Sorce Text file a.txt contain:

Hellow apple

target text file should contain the following result

Hellow banana

Thanks

What have you attempted so far and where do you get stuck?