Answer
$x=2y-6$
When the output is $4$, the input is $2$.
Work Step by Step
$y=\frac{1}{2}x+3$
Subtract $3$ from both sides of the equation to get
$y-3=\frac{1}{2}x+3-3$ or
$\frac{1}{2}x=y-3$
Multiplying by $2$ on both sides, we obtain
$x=2y-6$
When $y=4$,
$x=2(4)-6=2$.
That is, when the output is $4$, the input is $2$.