Expand the target expression:
A sin(x + ϕ) = A (sin(x) cos(ϕ) + cos(x) sin(ϕ)) = -2 sin(x) + 4 cos(x)
Then we have
A cos(ϕ) = -2
A sin(ϕ) = 4
Recall that sin²(x) + cos²(x) = 1 for all x. Then
(A cos(ϕ))² + (A sin(ϕ))² = (-2)² + 4²
A² (cos²(ϕ) + sin²(ϕ)) = 4 + 16
A² = 20
A = √20 = 2√5
Also recall that tan(x) = sin(x)/cos(x) by definition. Then
(A sin(ϕ)) / (A cos(ϕ)) = 4 / (-2)
tan(ϕ) = -2
ϕ = arctan(-2) = -arctan(2)