Jelly, 4? 8 bytes
With a strict interpretation of Rule 1 (can't take as a program argument due to the "single line" part) - a full program that reads from STDIN and writes to STDOUT:
ɠḲVµS÷4_
...or with site default IO instead - a monadic Link that accepts a list of five numbers and yields a list of five numbers:
S÷4_
How?
ɠḲVµS÷4_ - Main Link: no arguments
ɠ - read a line from STDIN
Ḳ - split that at spaces
V - evaluate that as Jelly code -> list of the five four-apple-weights, W
µ - start a new monadic chain - f(W)
S - sum W
4 - four
÷ - divide -> sum(W)/4
_ - subtract W (vectorises) -> [w1-sum[sum(W)/4-w1, w2-sum(W)/4-w2, w3-sum(W)/4-w3, w4-sum(W)/4-w4, w5-sum(W)/4, ]-w5]
- implicit print