Using same sample input as glenn jackman's answer
$ awk '$2 in seen{if(c[$2]--){print fl[$2]} print} !seen[$2]++{fl[$2]=$0; c[$2]=1}' file
a b
b b
c b
a d
b d
!seen[$2]++ if $2 is not encountered before:
fl[$2]=$0 save this first line, I've assumed input is not sorted and duplicates can occur anywhere in file, hence saving it based on $2 instead of just temporary variable
c[$2]=1 similarly, initialize count variable with 1
$2 in seen if $2 has occurred before:
if(c[$2]--){print fl[$2]} first print the previous line, counter is decremented so that condition will fail for subsequent matches
print then print the current line
With some other input
$ cat ip.txt
6.2 : 897 : bar
3.1 : 32 : foo
1.2 : 123 : xyz
2.3 : 32 : baz
7.5 : 897 : boo
$ awk -F: '$2 in seen{if(c[$2]--){print fl[$2]} print} !seen[$2]++{fl[$2]=$0; c[$2]=1}' ip.txt
3.1 : 32 : foo
2.3 : 32 : baz
6.2 : 897 : bar
7.5 : 897 : boo
Note that the order depends on how duplicates occur