O'Brien finds form, with bat and ball