For a vector:
cos^2(α) + cos^2(β) + cos^2(γ) = 1
From the givens:
α = π/4, therefore, cos(α) = 1/root 2 and cos^2(α) = 1/2
β = π/3, therefore, cos(β) = 1/2 and cos^2(β) = 1/4
Substitute in the above equation:
1/2 + 1/4 + cos^2(γ) = 1
cos^2(γ) = 1 - 1/2 - 1/4
cos^2(γ) = 1/4
cos(γ) is either 1/2 or -1/2
For cos(γ)= 1/2 .......> γ = π/3
For cos(γ)= -1/2 .......> γ = 2π/3