If there is a confusion b/w "only if" and "if" hopefully the following will clear that
It is a common mistake to read only if as a stronger form of if. It is important to emphasize that "q if p" means that p is a sufficient condition for q, and that "q only if p" means that p is a necessary condition for q.
Furthermore, we can supply more intuition on this fact: Consider q only if p. It means that q can occur only when p has occurred: so if we don't have p, we can't have q, because p is necessary for q. We note that if we don't have p, then we can't have q is a logical statement in itself: ¬p⇒¬q. We know that all logical statements of this form are equivalent to their contrapositives. Take the contrapositive of ¬p⇒¬q: it is ¬¬q⇒¬¬p, which is equivalent to q⇒p.
Ref: https://math.stackexchange.com/questions/617562/conditional-statements-only-if
This example might help:
"X kills blackbuck only if he has a gun with himself".
Q: X kills blackbuck
P: He has a gun with himself
P is a necessary condition for Q i.e. Having a gun with him is necessary to kill blackbuck.
If P is False then Q can't occur: If he doesn't have gun then he can't kill blackbuck.
But the mistake we usually do is we interpret the statement as P->Q which means that:
1.If X has gun with himself then he kills blackbuck (i.e. if P=T then Q=T).
2.If X doesn't have gun with himself then we don't know what X does (i.e. if P=F then Q=?). Whether he buys/borrows and then kills or just leaves it.
But according to the statement we know that X will kill only if he has a gun with himself which means he has to have a gun already with himself to kill.
If he does not have a gun(P=F) and since he does not buys/borrows it so he won't kill blackbuck i.e. Q=F. So if P' then Q' i.e. P'-> Q' which is Q->P.