Say A be the event of getting head and B be the event of getting six.
So probability of getting head or six =
P = P(A) + P(B) - P(A intersection B)
P = (1/2) + (1/6) - (1/12)
P = 7/12
Also you can do by the following method :-
Total possible outcomes-
[ {H,1},{H,2},{H,3},{H,4},{H,5},{H,6},{T,1},{T,2},{T,3},{T,4},{T,5},{T,6} ] = 12 outcomes
Favourable = [ {H,1},{H,2},{H,3},{H,4},{H,5},{H,6},{T,6}] = 7 outcomes
So P = 7/12