Obtain the value of \((\sin x + \sec x)^2 + (\cos x + \text{cosec}\: x)^2\).