Entropy and Equilibrium Constant: Chemical Thermodynamics For a reaction taking place in a container in equilibrium with its surroundings, the effect of temperature on its equilibrium constant $K$ in terms of change in entropy is described by:
(A) With the increase in temperature, the value of $K$ for exothermic reaction decreases because the entropy change of the system is positive
(B) With the increase in temperature, the value of $K$ for endothermic reaction increases because of an unfavorable change in entropy of the surroundings decreases
(C) With the increase in temperature, the value of $K$ for endothermic reaction increases because the entropy change of the system is negative
(D) With the increase in temperature, the value of $K$ for exothermic reaction decreases because the favorable change in entropy of the surroundings decreases

Now, I am having trouble understanding option (B) (which in fact, is one of the correct options).
Since the process is endothermic and the temperature is rising, the value of $K$ increases, so heat must flow from surroundings to the system to favor the reaction which implies increase in an unfavorable change in entropy of surroundings rather than decrease as given in the option.
Kindly clarify my doubt. Also, any insights (other than the ones already given in the links attached below) into other options are very appreciated.
This question might look Duplicate of the questions already posted here:

relation between equilibrium constant and entropy change

Effect of temperature on equilibrium constant in terms of entropy change



But since this question is not focusing on the same problem, so I hope, it will not be marked as duplicate.
I agree it's not a duplicate because, while you are asking about the same homework problem discussed in the other question you linked, the issue you are having is different.  Hence, because the last answer didn't address your specific confusion, you are asking a different question about that same homework problem.

Here's where you've got things mixed up:  Whether a reaction is exothermic or endothermic depends on the inherent nature of the reactants and products, not the equilibrium constant.  I.e., $\Delta H^{o}_{rxn}$ is the enthalpy change for a complete conversion of reactants to products at standard state, irrespective of the equilibrium constant.  It's not, as I believe you were thinking, the enthalpy change to go from pure reactants to the equilibrium mixture. Hence if you could, say, change $K_{eq}$ purely by tweaking $\Delta S^{o}_{rxn}$, then $\Delta H^{o}_{rxn}$ wouldn't change just because you've changed $K_{eq}$. 

So B is correct.   If you raise T (and here we're assuming $\Delta H^{o}_{rxn}$ is independent of T), and $\Delta H^{o}_{rxn} &gt; 0$, the reason the reaction shifts to the right is this: In calculating $\Delta S^{o}_{surr}$, we have to divide $q_{rev, surr} = q_{surr}$ by T, and  T is now higher.  Hence, for the same heat flow from the surroundings (which is given by $-\Delta H^{o}_{rxn}$), the resulting unfavorable entropy change in the surroundings is less.

[I've used standard state here, which means it's carried out at a constant external pressure of 1 bar, but what I've written applies at any constant external pressure.]