It looks like you're working from the JSpOC Spaceflight Safety Handbook for Operators (https://www.space-track.org/documents/JSpOC_Spaceflight_Safety_Handbook_For_Operators.pdf). In this case they define the RIC frame as identical to what is often called the UVW frame (https://www.space-track.org/documents/JSpOC_Pc_4Aug16.pdf pg 3).
This frame is defined such that:
Radial (R or U) is in the direction of the position vector
Cross-track (C or W) is in the direction of the angular momentum vector (P cross V)
In-track (I or V) is W cross U
The in-track vector will be coincident with the velocity vector for a perfectly circular orbit.
To calculate this for a conjunction scenario, calculate the relative position vector in ECI coordinates between your primary and secondary objects. Then multiply it by the ECI->UVW transformation matrix [T] for the primary.
{u} = |{P}|
[T] = {w} = |{P}x{V}|
{v} = |{w}x{u}|
Where {P}, {V} are the ECI position and velocity vectors of the primary object. || indicates taking the unit vector.
{u}, {v}, {w} are then the rows of the transformation matrix [T]
So, to get the relative position vector in the RIC frame...
Start by calculating the relative position in the ECI frame
{Prel} = {P} - {Psecondary}
where {P} is the ECI position of the primary object and {Psecondary} is the ECI position of the secondary object.
Calculate the transformation matrix [T] as described above using the ECI position & velocity of the primary object ({P}, {V})
Then the relative position in the RIC frame, {Pric} is:
{Pric} = [T]{Prel}